3 ms·
> svelte people have always cast a narrow eye towards typescript and for good reasons as well. Out of curiosity, could you elaborate on this a little?
by tmnvix 2y ago
> svelte people have always cast a narrow eye towards typescript and for good reasons as well.
Out of curiosity, could you elaborate on this a little?
- crummy 2y agoSvelte supports TypeScript, but the project itself dropped it for JSDocs a year or so back. Here's a discussion on it, with the first post from Rich Harris himself with some reasoning: https://news.ycombinator.com/item?id=35891259 https://news.ycombinator.com/item?id=35891259
- xrd 2y agoBut, briefly, TS is tricky if the entirety of the ecosystem isn't TS. It's becoming less of a problem, and things like deno and bun that have native support for TS are solving the problem, but Rich Harris made compelling arguments for why they went with JSDoc. And, I don't think that is a perfect solution either, but I can write code that runs even if the JSDoc isn't correct, and I can't do that when the TS compiler refuses to compile for some reason like an external library isn't right.
- afiori 2y agoThis is why the types-as-comments proposal for ecmascript could be a game changer, most ts files would magically become valid js files; no compilation needed