Hacker News new | past | comments | ask | show | jobs | submit login

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!



Here'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 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.


What you're saying there is: in development, use sucrase. In production, use sucrase.

And saying it quite a lot in this thread.


Sorry, I meant to say use snowpack.


You 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....


That'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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: