by jbigelow76 · 11y ago · 0 comments
Has anybody else felt that way and did you go forward with TS or stick with vanilla JS?
Basically, if you want to use ES6 (or ES7) features and are targeting an environment that might not have native support (browsers) or inconsistent support (browsers, io.js, node.js) then you will inevitebly need or want a build step at some point. You could probably get by with some on-the-fly transpiling for a little bit but I would avoid that as a long-term solution except for maybe in tests.
I highly recommend setting up a build step in any project for BabelJS to ES5, TypeScript to ES5, or my favorite, TypeScript to ES6 to BabelJS to ES5.
Not only will you get awesome language features, you will also get some really great tooling in VS Code or Atom.
Also, it's worth noting that all of these language features are pretty much all optional so you can ease into them.
If yes, then TypeScript is quite similar to plain JavaScript and introduces this feature you want.
If no, then JavaScript should be sufficient.