2 ms·
The problems you mention aren't related to transpilation or even JavaScript. They're due to TypeScript being a backwards-compatible superset of JS. TS is, amon
by lobster_johnson 9y ago
The problems you mention aren't related
to transpilation or even JavaScript. They're due to TypeScript being a backwards-compatible superset of JS.
TS is, among other things, JS plus type annotations, but it also relies on the same underlying type system as JS, and TS types, as I understand it, are completely erased at runtime. For example, interfaces don't exist in JS, and classes are prototype-based. So it inherits those flaws, and doesn't patch over them with some kind of runtime, and you end up with a leaky abstraction.
I don't know anything about Reason's JS interaction to say if it's similarly leaky.