2 ms·
It's really the most important feature/aspect of TypeScript -- the fact that it's just a type-checking veneer on top of JavaScript. It's not its own language l
by atombender 8y ago
It's really the most important feature/aspect of TypeScript -- the fact that it's just a type-checking veneer on top of JavaScript.
It's not its own language like Dart or the myriad of languages (Reason, PureScript, etc.) that transpiled to JavaScript. It's not just that its types are erased at runtime, as you point out; there are many nuances caused by the fact that it's a superset of JS.
While I think TypeScript is the best we have right now, I'm also a bit sad that we need to endure this kind of compromise. Maybe once Wasm because widely supported we can finally cast away the JS legacy and begin anew.