The Stage 3 Decorators Proposal
You'll learn what the current TC39 Stage 3 decorators specification looks like and how it differs from earlier decorator proposals that never made it into JavaScript.
The Official Standard (Almost)
The Stage 3 Decorators Proposal represents the current, near-final specification for decorators in JavaScript. After years of competing proposals and redesigns, TC39 reached Stage 3 in March 2022—meaning the specification is stable and implementations are happening in browsers and transpilers.
What Changed from Earlier Proposals
Earlier decorator proposals (Stage 1 and 2, circa 2015-2018) worked very differently:
Old approach: Decorators received the class/method descriptor directly and could mutate it. They looked like @decorator but worked more like property descriptor manipulation.
Stage 3 approach: Decorators receive a value and context object, then return a new value or replacement function. They're additive rather than mutative—you don't modify the original, you wrap or replace it.
Why the Redesign?
The older proposals had issues:
- Performance concerns with runtime descriptor manipulation
- Unclear interaction with private fields
- Complex mental model for engine optimization
Stage 3 decorators are simpler and more composable. They work cleanly with classes, methods, fields, getters, setters, and auto-accessors. They also integrate naturally with private members (introduced in ES2022).
Think of It Like This
Old decorators were like handing someone your house keys and letting them rearrange furniture. Stage 3 decorators are like providing blueprints—the decorator returns new instructions that JavaScript follows when building the class.
Key Takeaway: The Stage 3 Decorators Proposal is the current standard-track specification that simplified and stabilized decorator syntax, replacing earlier incompatible proposals with a cleaner, performance-friendly design that works with modern JavaScript features.