Get AI summaries of any video or article — Sign up free
Big projects are ditching TypeScript… why? thumbnail

Big projects are ditching TypeScript… why?

Fireship·
4 min read

Based on Fireship's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.

TL;DR

Several major open-source projects are moving away from TypeScript in their internal library codebases, even while end users can still use TypeScript through framework tooling.

Briefing

Big projects aren’t abandoning TypeScript because types are suddenly useless—they’re walking away from TypeScript’s *costs* in library development, while keeping its benefits in application development. The shift shows up as major open-source teams moving away from TypeScript in their codebases, even as end users can still use TypeScript normally through framework integrations. The practical question becomes less “Did TypeScript win?” and more “Which parts of the TypeScript toolchain are worth paying for, and where?”

The timeline helps explain the reversal. TypeScript debuted in 2012 from Microsoft and initially drew little attention. Adoption accelerated when Angular 2 embraced it, and by the early 2020s it was everywhere—so much so that many former skeptics became “true believers.” Now, with TypeScript saturation approaching its peak, a new wave of projects is choosing plain JavaScript instead of TypeScript for their internal implementation.

Svelte, Drizzle, and Turbo are cited as examples of libraries that are dropping TypeScript *for development*, not necessarily for users. That distinction matters: developers using Svelte can still write TypeScript in their own apps. What’s changing is the language used inside the library’s source code, where the tradeoffs look different.

One major reason is friction from TypeScript’s “type gymnastics.” DHH, creator of Ruby on Rails, is highlighted for getting rid of TypeScript and Turbo, arguing that the compile step isn’t the real issue—TypeScript’s complexity pollutes the codebase with contortions to satisfy the type system. The transcript frames this as especially painful when building libraries, where developers often need to fight the IDE and the compiler to keep types accurate. In strict mode, avoiding explicit types can force heavy use of `any`, producing code that feels less readable and less “beautiful,” even if it’s technically correct.

Turbo’s reaction is described as angry and frustrated, with TypeScript contributors feeling their work is now “dead on arrival.” Svelte’s reasoning is portrayed as more pragmatic. Rich Harris’s approach is to remove the compile step for Svelte’s core while preserving much of TypeScript’s value through a documentation-and-types workflow: using JSdoc-style comments to declare types and generate `.d.ts` files. That still delivers editor IntelliSense and early bug detection, but without requiring the project itself to be written in TypeScript.

The transcript draws a boundary between libraries and applications. For app frameworks like SvelteKit or Next.js, TypeScript integration is described as seamless, making it unlikely that many teams will abandon it for real products. Finally, it points to a potential future détente: an ECMAScript proposal for optional native type annotations in JavaScript could make TypeScript “nearly obsolete,” turning today’s holy war into a more unified ecosystem.

Cornell Notes

TypeScript’s dominance is being challenged not by a rejection of types, but by a rejection of TypeScript’s overhead inside some large open-source libraries. Projects such as Svelte, Turbo, and Drizzle are moving away from TypeScript in their *codebases*, while still allowing end users to use TypeScript normally through framework tooling. Critics like DHH argue that TypeScript can force “type gymnastics” that clutter library code, especially under strict mode where avoiding explicit types can lead to frequent `any`. Svelte’s alternative keeps editor benefits by using JSdoc-style comments to generate `.d.ts` files, preserving IntelliSense without a compile step. For application frameworks like SvelteKit and Next.js, TypeScript integration remains convenient, so abandonment is less likely.

Why are some big open-source projects ditching TypeScript in their own codebases?

The transcript frames the shift as a response to TypeScript’s costs in library development. DHH’s rationale is that TypeScript “pollutes the code with type gymnastics,” making library code harder to read and maintain. The issue isn’t the compile step itself, but the contortions needed to satisfy the type system—especially in strict mode where developers may need to use `any` or add explicit types to silence IDE/compiler errors.

How can a project drop TypeScript internally while still supporting TypeScript for users?

The transcript emphasizes that “dropping TypeScript” often means the library’s source code is written in plain JavaScript, not that TypeScript disappears for consumers. In a framework like Svelte, end users can still write TypeScript in their applications as usual, because the framework/tooling provides the TypeScript experience externally even if the library itself isn’t authored in TypeScript.

What is Svelte’s practical alternative to TypeScript, and what benefits does it preserve?

Svelte is described as moving to plain vanilla JavaScript while keeping TypeScript-like benefits through JSdoc-style comment annotations. Those comments can be used to generate `.d.ts` type definition files, which then provide IntelliSense in editors and help catch bugs early—similar to what developers expect from TypeScript—without requiring the project to compile TypeScript.

Why does the transcript suggest TypeScript is still likely to stick around for application frameworks?

For application-focused tools like SvelteKit or Next.js, the transcript claims TypeScript integration is “seamless.” Reproducing the same developer experience with JSdoc-based typing would be described as a “total nightmare,” so teams building actual apps are less likely to switch away from TypeScript.

What future change could reduce the need for TypeScript?

The transcript points to a stage 1 ECMAScript proposal for optional type annotations in JavaScript. If JavaScript can natively support optional types, TypeScript could become “nearly obsolete,” potentially ending the current ecosystem conflict by making typed JavaScript a first-class option.

Review Questions

  1. What specific pain points make TypeScript feel less attractive for library authors compared with app developers?
  2. How does JSdoc-based typing with generated `.d.ts` files replicate key TypeScript benefits like IntelliSense?
  3. What distinction does the transcript make between dropping TypeScript in a library codebase versus abandoning it for end users?

Key Points

  1. 1

    Several major open-source projects are moving away from TypeScript in their internal library codebases, even while end users can still use TypeScript through framework tooling.

  2. 2

    DHH’s criticism centers on TypeScript “type gymnastics” that clutter library code, not on the existence of a compile step.

  3. 3

    Strict TypeScript mode can push developers toward explicit types or frequent `any`, which can reduce code clarity and maintainability.

  4. 4

    Svelte’s approach keeps editor value by using JSdoc-style type annotations to generate `.d.ts` files, enabling IntelliSense without compiling TypeScript.

  5. 5

    Library development and application development have different tradeoffs; app frameworks like SvelteKit and Next.js are described as integrating TypeScript smoothly.

  6. 6

    A stage 1 ECMAScript proposal for optional type annotations could eventually make TypeScript less necessary by bringing typing closer to native JavaScript.

Highlights

The core dispute isn’t about whether types help—it’s about whether TypeScript’s internal complexity is worth it for library maintainers.
Svelte’s compromise preserves IntelliSense by generating `.d.ts` from JSdoc-style comments, while avoiding a TypeScript compile step.
Turbo’s shift triggers backlash from TypeScript contributors, illustrating how language choices affect contributor workflows and expectations.
The transcript draws a line: app frameworks are likely to keep TypeScript, while some libraries are experimenting with plain JavaScript plus generated types.
Optional native type annotations in a future ECMAScript proposal could reduce TypeScript’s role and soften the “holy war.”

Topics

  • TypeScript Adoption
  • Library vs Application Tooling
  • JSdoc Type Generation
  • Strict Mode Tradeoffs
  • Optional Type Annotations

Mentioned