3 ms·
> TS is already a new (superset) language which compiles to JS. Yes, but also no. The point is that it doesn't really add more semantics over plain JS. You can
by Quekid5 3y ago
> TS is already a new (superset) language which compiles to JS.
Yes, but also no. The point is that it doesn't really add more semantics over plain JS. You can erase all the type annotations (well, replace with "any") and it'll do the same thing if you ignore the type checking.
If there's any "transformation" from TS to different-looking JS[0], it's mostly just syntactic embellishment (think LISP macros and such), not semantic.
[0] Not sure if there is, tbh