4 ms·
> Not everyone wants to use TypeScript. You don't have to use TS. Deno runs plain JS, too. > [TypeScript] will probably become obsolete once optional type ann
by mark_and_sweep 6y ago
> Not everyone wants to use TypeScript.
You don't have to use TS. Deno runs plain JS, too.
> [TypeScript] will probably become obsolete once optional type annotations gets added to JavaScript.
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.
> An opinionated toolchain is nice, but should be optional IMHO.
It is optional. You don't have to run deno lint, deno fmt, deno test, etc. But at the same time, they are pretty good tools so you might want to try them.
- 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.