DEV Community

Dwayne Charrington
Dwayne Charrington

Posted on

What is your favourite Javascript superset and why is it TypeScript?

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)

Collapse
 
seanmclem profile image
Seanmclem

There are other Javascript supersets?

Collapse
 
girlprog profile image
girlProg

Came to find out what they are 🤷🏽‍♀️

Collapse
 
beggars profile image
Dwayne Charrington

I think the joke in the headline might have been missed here.

Thread Thread
 
girlprog profile image
girlProg

Omg i just saw it 😂 crazy

Thread Thread
 
seanmclem profile image
Seanmclem

nope

Collapse
 
adnanbabakan profile image
Adnan Babakan (he/him)

Actually there are. I think CoffeeScript can be counted as a superset of JavaScript. It was famous for a while.

Collapse
 
seanmclem profile image
Seanmclem • Edited

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.

Thread Thread
 
beggars profile image
Dwayne Charrington

Are you okay, Sean?

Thread Thread
 
seanmclem profile image
Seanmclem

How can I help? Try reading it again

Collapse
 
jwp profile image
John Peters

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.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

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 with tsconfig.json.

  • Flow feels like optional TypeScript to me, and it does require compilation.
  • I don't like JSX / TSX. As for now, I will import HTML with raw-loader instead. (*.vue can also import *.ts as well.)
  • I also like 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.

Collapse
 
saint4eva profile image
saint4eva

Blazor (C#) is not really about compiling down to JavaScript, rather about targeting WebAssembly which almost all the modern browsers support.

Collapse
 
juancarlospaco profile image
Juan Carlos

Nim for me.