64
Comments
  • 3
  • 1
    Better than vanilla js. Otherwise, nothing special.
  • 1
    @PhilWerman It always depends on what you need. If you need a super simple website which has 2 buttons I wouldn't hassle using typescript. But in enterprise business applications, companies often want something like angular or react anyways (and both include typescript). So what. Complex to setup? @angular/cli works like a charm. new-react-project also works without any problems that I know of.

    Better code is almost guaranteed since you don't have to mess with any polyfills/browser compatibilties on your own since most of these frameworks already do that for you. There are people that jobs dedicate to standards like ECMA so there has to be an advantage right?
  • 1
    @btastic Having polyfills has nothing to do with writing better code. I can use Babel with vanilla JS to get the same result.

    Using Typescript doesn't prevent you from writing bad code. It's just as easy to use bad practices and write buggy code.

    Typescript merely adds type checking, nothing more.
  • 2
    @NGPixel If the argument was about good or bad code in the first place, it would be not an argument anyways. No framework will prevent you from writing bad code. But typescript ensures some standards you won't get with vanilla js as easy as with typescript.
Add Comment