3 ms·
In TypeScript, there's no* way to run your code without invoking the type checker, as it has to transpile TS to JS. While you can suppress/reduce the strictness
by zbentley 5y ago
In TypeScript, there's no* way to run your code without invoking the type checker, as it has to transpile TS to JS. While you can suppress/reduce the strictness of the checker, you can't avoid it entirely, and opting out takes work.
Python is the opposite; using type annotations for any sort of verification is opt-in exclusively, and not part of the language/runtime itself.
*Yes, there are some direct TS runtimes/compilers, but they aren't how the vast majority of TS code runs.