3 ms·
Alas, many of us still need to support IE11. We alas get a lot of value out of TypeScript, which needs to be transpiled. <1 second with esbuild is pretty good!
by nicoburns 6y ago
Alas, many of us still need to support IE11. We alas get a lot of value out of TypeScript, which needs to be transpiled. <1 second with esbuild is pretty good!
- crazypython 6y agoHere's my suggestion if you want faster builds: In development, use an index.html that loads it directly from the filesystem, using a single-pass annotation remover such as https://github.com/alangpierce/sucrase https://github.com/alangpierce/sucrase A single-pass transpiler doesn't build an AST, instead just looping over everything once, which will surely make it faster than esbuild. In production, use a bundler like snowpack.
- ljm 6y agoWhat you're saying there is: in development, use sucrase. In production, use sucrase. And saying it quite a lot in this thread.
- crazypython 6y agoSorry, I meant to say use snowpack.
- runarberg 6y agoYou can annotate your code with JSDoc comments and get the full value of TypeScript while just writing JavaScript without any transpilation step[1]. It won’t help you with IE11 support though. 1: https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html https://www.typescriptlang.org/docs/handbook/intro-to-js-ts....
- pitaj 6y agoThat's a helpful feature but it's by no means a replacement for Typescript. You do not get the full value with just inline comments, in fact that usage is extremely limited.