Svelte’s Migration from TypeScript to JSDoc and Insights from Deno’s TypeScript Shift
The article explains Svelte’s plan to replace TypeScript with JSDoc, confirms the move with Rich Harris’s tweet, outlines benefits for compiler debugging and type safety, and compares the decision to Deno’s earlier internal migration to JavaScript to cut build time and bundle size.
According to a pull request titled "TS to JSDoc Conversion" in the Svelte repository, the Svelte team plans to migrate from the currently used TypeScript to JSDoc.
Rich Harris, the founder of Svelte, confirmed on Twitter that this decision does not change Svelte’s type safety.
The developers of the Svelte compiler added that using JSDoc allows debugging without a build step, simplifying compiler development, while type checking remains comparable to TypeScript through the tsc compiler.
For Svelte application developers, the change will not affect the availability of type definition files, so their typing experience stays the same.
Svelte is not the first front‑end framework to abandon TypeScript; in 2020 Deno partially migrated its internal code to JavaScript to reduce build time.
Deno’s reasons for the migration include:
TypeScript compilation can take minutes, slowing continuous builds.
TypeScript structures cause runtime performance issues when creating Deno executables and user‑facing API source files.
TypeScript adds little value to Deno’s code organization while increasing the organizational burden.
Maintaining separate .d.ts files requires manual synchronization between internal code and runtime declarations.
Deno operated two separate TypeScript compiler hosts for internal and external code, which were largely redundant.
The overall goals are to reduce build time, lower the size of released code, and decrease the amount of code developers need to write, while noting that Deno kept TypeScript for user‑code.
In summary, although TypeScript is often seen as an improvement over JavaScript, its slow compilation speed can become a significant drawback for large projects, even though it provides many benefits for smaller ones.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.