4 ms·
Out of curiosity, how long is your experience with TypeScript? I feel like I have to ask. >TypeScript does not modify this code when it compiles to JavaScript
by jesus-was-here 2y ago
Out of curiosity, how long is your experience with TypeScript? I feel like I have to ask.
>TypeScript does not modify this code when it compiles to JavaScript
TypeScript does not modify any code which is valid JavaScript. Your idea of adding some sort of "debug build" to TypeScript would never be performed by `tsc`, but perhaps by bundlers, etc.
You might want to look up libraries like zod, or even better, Effect: https://effect.website/ https://effect.website/
- CodeAndCuffs 2y agoIve used fp-ts, mainly for Either, Option, and Pipe. I tried out Effect for a new project, and have loved it. The initial hurdle was a little intimidating but I was productive with it within 2 days, and it's paid dividends. It's discord community was surprisingly great, and helped me turn an okay module into an amazing one. Effect is huge, and does seemingly everything, but it probably does the specific thing you want to do now, with the ability to extend to the other stuff as you need/want
- jesus-was-here 2y ago[dead]
- danvk 2y agoExtensive. Try reading the full post, you'll see that those points are all mentioned.
- jesus-was-here 2y ago[dead]
- likeclockwork 2y agoTypescript's refusal to participate in codegen is one of the things I don't like about it. It makes Typescript a descriptive, rather than expressive, language with weak semantics.
- jesus-was-here 2y ago[dead]