ECMAScript Alignment Strategy
What you'll learn: How TypeScript carefully tracks and adopts new JavaScript features as they progress through TC39's standardization process, and the timeline from proposal to support.
TypeScript's Tracking Philosophy
TypeScript doesn't exist in isolation—it's fundamentally a superset of JavaScript. This means the TypeScript team must constantly watch what's happening in JavaScript's evolution and decide when and how to support new features.
The ECMAScript Alignment Strategy is TypeScript's approach to staying synchronized with JavaScript without breaking existing code or adopting features that might never ship.
The TC39 Stage Pipeline
JavaScript features move through five stages (0–4) in the TC39 process. TypeScript's strategy maps to this:
-
Stage 0-1 (Strawperson/Proposal): TypeScript rarely touches these. Too experimental, too likely to change or die.
-
Stage 2 (Draft): TypeScript may begin experimental support if there's strong developer demand and the syntax is stable enough. This is risky territory.
-
Stage 3 (Candidate): This is where TypeScript typically engages seriously. The feature is highly likely to ship, syntax is locked down, and developers want to start using it. TypeScript often provides support here, sometimes behind flags.
-
Stage 4 (Finished): The feature is officially part of JavaScript. TypeScript ensures full, stable support in the next release cycle.
The Timeline in Practice
From TC39 Stage 3 to TypeScript support usually takes 3–12 months, depending on complexity. For example, decorators spent years in flux before reaching stable support. Pattern matching is still being designed, so TypeScript waits.
TypeScript doesn't want to implement something at Stage 2 only to have it change drastically at Stage 3, breaking everyone's code. The alignment strategy prioritizes stability over early adoption.
Key Takeaway: TypeScript follows a conservative alignment strategy, typically adopting JavaScript features at Stage 3 when syntax stabilizes, ensuring developers can use modern JavaScript without breaking changes as proposals evolve.