TypeScript Decorators

Parent: TypeScript Expert · researched 2026-06-03T23:22:52.632Z· 8 sources · 7 concepts · skill typescript-decorators

A lang-js-ts hub reference for the two distinct decorator systems TypeScript ships. They share the @expr syntax and nothing else: different semantics, different signatures, mutually incompatible emit.

TypeScript Decorators — Standard (Stage 3) vs Legacy (experimentalDecorators), Metadata & Migration

Overview

1. How TypeScript picks a system (the flag is a whole-semantics switch)

2. Standard (Stage 3) decorator model — the `(value, context)` signature

3. The `accessor` keyword (auto-accessors) — TS 4.9

4. Decorator factories & composition

5. Evaluation order vs application order (standard)

6. Metadata — Stage 3 (`Symbol.metadata`) vs legacy (`reflect-metadata`)

7. Legacy decorator signatures (still in heavy use)

Tools / Frameworks

Methodology

Practical Patterns

Anti-Patterns

Troubleshooting

References

Children

← the whole tree · 3D view· how to read this page