Comment

Comment by jesus-was-here

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/

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton