|
|
|
|
|
by noir_lord
3242 days ago
|
|
Not sure that's true anymore with TypeScript. They made a real focus on tooling and it's been widely adopted. In intellij it's as simple as turning on the option and creating a .ts file, the identically named js file is then dropped in the same directory (by default) and you just include that. It's about 2 minutes from start to finish to setup. Then it's a natural progression to using https://www.typescriptlang.org/docs/handbook/tsconfig-json.h... I mean sure if you are going with a split bundle, hot code reloading and tree shaking via webpack then there is a high start cost but ts on it's own is rather fantastic. vscode does the same thing as intellij if you want to try it without downloading intellij. |
|
Excellent point, and one of the less-advertised benefits of using TypeScript.
I tend to use Babel/Webpack in most of my projects, mostly because I have the time to waste on keeping up with the 'bleeding edge' and I kind of enjoy it (in perhaps a slightly masochistic way).
That said, more than once I picked TypeScript for some project not primarily because of its main purpose, but rather because it offered a simple way to transpile 'ESNext' to ES5. Despite the fact that a basic Babel/Webpack setup is second nature to me now, it still feels easier to just use TypeScript to do all of it at once, and get types as part of the deal!