| I've been using both for a few years (TS at my old job, es6 at my new job but we're moving to TS so now I'm using both depending on what I'm working on). The use case I like most about typescript is it makes refactoring and making changes really painless. For example, in an angular app, you may have a service that several components rely on. When changing a method signature in the service, you'll get compile-time info about any other usages of that service, and you feel a lot more confident about making changes without something dumb slipping through the cracks and causing bugs in production. This confidence generally lends itself to less fear of change and more willingness to refactor, which leads to a better/cleaner codebase. Aside from that, I love the JSDoc comments showing up as you type, especially if you're working on a team in which you may not know 100% what everyone has worked on. Other features I use every day and love: -automatic/generated import statements -type definitions for libraries (most have solid documentation) -control-flow logic checking (you'll find more bugs than you think with this and it encourages more defensive programming) -transpiling down to support older browsers (babel does this too but it's nice to have it built in) Edit: I forgot to go into the "cons" list here. -there's some finagling you'll have to do with some of the more poorly-written npm packages that strap themselves onto globals -there's a slight learning curve -you'll require a build step (with es6 if you're targeting es6-only browsers you can deploy just static files, but most people use webpack/babel anyway for older browser support and other things webpack gives you like bundling/minification/etc) |
I'd like to note that this is done automatically in Visual Studio 2015 and on. You just save your .ts file and VS will create the .js file.