3 ms·
I feel like the point is skipped in the post: if you ship TS sources, it means you need the TS compiler on the installed side, right? And specifically the right
by viraptor 2y ago
I feel like the point is skipped in the post: if you ship TS sources, it means you need the TS compiler on the installed side, right? And specifically the right TS version for each installed package... which in some cases may mean conflicting requirements?
(If you own code is in JS, that is)
- maxloh 2y agoThe TypeScript compiler is, in most or even all cases, backward compatible. You just need to have the latest version installed.
- viraptor 2y agoThey may not be frequent, but they do happen https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#breaking-changes-and-deprecations https://www.typescriptlang.org/docs/handbook/release-notes/t... And given enough public modules, we will find some conflicts in the dependency graph. YOLO just use the latest version is rarely a full solution.
- mmoskal 2y agoYou would be probably better off just running esbuild or similar - it will happily strip types from any version of TS.
- mhagemeister 2y agoAuthor here. True, I think I should've worded it better. I work for Deno and it being a JS runtime that is able to run TS natively makes this less of an issue. The problem that a dependency needs a specific TS version hasn't come up so far. But that might be because Deno users tend to update to the latest version pretty frequently as we haven't done any breaking changes so far.