With a wide variety of options out there for writing better Javascript, TypeScript seems to have "won out" of most other options. Growing in popularity immensely in 2019, undoubtedly continuing in 2020: why do you love TypeScript?
For me, I have seen first-hand how TypeScript has made me a better developer. It catches basic mistakes (like trying to pass a number to a function that accepts a string) and combined with ESLint and TypeScript specific rules, I've become more disciplined and conscious in the code that I write.
Top comments (13)
There are other Javascript supersets?
Came to find out what they are 🤷🏽♀️
I think the joke in the headline might have been missed here.
Omg i just saw it 😂 crazy
nope
Actually there are. I think CoffeeScript can be counted as a superset of JavaScript. It was famous for a while.
There you go good example. I feel like the joke would have only been funny because typescript is the obvious choice, not because it's the only choice.
Are you okay, Sean?
How can I help? Try reading it again
I like Typescript because its Architect, Anders Hejlsberg has a stellar history. C# being just one of his accomplishments.
I like to think of Typescript as his newest and best project yet.
Typescript's popularity is just now hitting stride. It is a game changer.
You should really rename your question to compile to JavaScript, as it will also include something like Dart (AngularDart / Dart2js), Blazor (C#), etc.
If you mean Babel, Flow, JSX -- I like TypeScript, because it is easy to setup and standardized enough. But under the hood, Vue CLI does create
.babelrc.js
along withtsconfig.json
.raw-loader
instead. (*.vue
can also import*.ts
as well.)interface
and writing declaration files.Svelte looks nice. I might try it sometimes.
Elmlang looks both complicated and React-like. I feel like it is not yet for me.
I feel that CoffeeScript is relatively dead...
I don't know much about ReasonML / PureScript, etc.
Blazor (C#) is not really about compiling down to JavaScript, rather about targeting WebAssembly which almost all the modern browsers support.
Nim for me.