3 ms·
> My context is that I've not looked into TypeScript yet. That means I have no idea how it works. The main problem Tim has is that he doesn't write TypeScript,
by anandchowdhary 6y ago
> My context is that I've not looked into TypeScript yet. That means I have no idea how it works.
The main problem Tim has is that he doesn't write TypeScript, so he wouldn't be able to contribute to dependencies. I don't think that's a huge problem since learning limited TypeScript to make patches to projects isn't very hard. In most cases, some patches might not require any TypeScript features at all.
> So essentially, the problem is that TypeScript authors publish their packages on npm, the package manager for Node.js. And to me, that's what is weakening the JavaScript ecosystem.
This doesn't make much sense to me, because the convention is to publish the "dist" folder to npm that has compiled JavaScript with declaration files, not the TypeScript source. To the Node.js engine, a package written in TypeScript is indistinguishable from one written in plain JavaScript. Declaration files have the added advantage of intellisense in IDEs that support language tools like VS Code.
> However, continuing to publish TypeScript packages to npm is, in my opinion weakening the JavaScript ecosystem as it's splitting its community and polluting the npm namespace.
Again, I point out that you can use TypeScript packages in Node.js/JavaScript projects. The pollution argument doesn't hold for me. npm packages already have a lot of "versions", like publishing ES Modules, compiled JS, legacy Node.js modules (module.exports), etc., so having TypeScript-compiled code that doesn't require additional tooling is the least of our problems. :)