2 ms·
> What makes you think that type annotations will be added to JS? I think it's far more likely that browsers and other runtimes will natively support TS as a se
by z3t4 6y ago
> What makes you think that type annotations will be added to JS? I think it's far more likely that browsers and other runtimes will natively support TS as a separate language rather than JS evolving to become TS.
It has already been tried with Dart. Dart was made because JS lacked a type system, preventing further optimisations.
Support for Dart was added in Chrome.
Another popular JS transpiler is CoffeeScript, most of it's syntax is now in JavaScript.
- mark_and_sweep 6y agoI have no data to prove this, but I feel like TS is far more widely used than CoffeeScript and Dart have ever been. Support for Dart in Chrome was added before Dart was popular (if you can even consider it popular at all). Since TypeScript is already popular now, I think if Chrome added support for stripping the types and running TS code as JS, most devs would welcome that.