Hacker News new | ask | show | jobs
by longrod 1487 days ago
Typescript doesn't solve any of the mentioned issues. You can't use CommonJS modules if you are targeting ES6+. And you can't use ES6 modules if you are targeting CommonJS. The only thing really useful about Typescript is types + generics (to some extent).

If you install any library that's either only ESM or CommonJS, you can't run your program. It simply doesn't work.

1 comments

I have never had this issue in my life. If you have issues with module bundling, use a module bundler.