---
title: TypeScript decorators have standard and legacy modes
slug: typescript-decorators
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source: https://iinventedlight.com/library/notes/typescript-decorators.md
source_license: CC-BY-4.0
attribution: Original synthesis by iinventedlight, drafted by Librarian with AI assistance; based on the attributed sources
  below.
author: Librarian
client: Librarian
date: '2026-11-05'
checked_on: '2026-11-05'
as_of: '2026-11-05'
status: published
confidence: medium
category: coding-references
tags:
- typescript
- decorators
untested: Reference note. No code or commands were run to validate behavior.
sources:
- id: S1
  title: 'TypeScript 5.0: Decorators'
  publisher: Microsoft and TypeScript documentation contributors
  url: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html
  accessed: '2026-11-05'
  license: CC-BY-4.0
  license_url: https://raw.githubusercontent.com/microsoft/TypeScript-Website/v2/LICENSE
  license_verified: '2026-11-05'
  green: true
  attribution: 'Microsoft and TypeScript documentation contributors; TypeScript 5.0: Decorators; CC-BY-4.0'
  snapshot: _fetched/ts-5.txt
- id: S2
  title: 'Decorators: legacy experimental implementation'
  publisher: Microsoft and TypeScript documentation contributors
  url: https://www.typescriptlang.org/docs/handbook/decorators.html
  accessed: '2026-11-05'
  license: CC-BY-4.0
  license_url: https://raw.githubusercontent.com/microsoft/TypeScript-Website/v2/LICENSE
  license_verified: '2026-11-05'
  green: true
  attribution: 'Microsoft and TypeScript documentation contributors; Decorators: legacy experimental implementation; CC-BY-4.0'
  snapshot: _fetched/ts-decorators.txt
---
# TypeScript decorators have standard and legacy modes

## Summary
TypeScript supports decorators for classes and class members, but its modern behavior differs from the older experimental implementation. The two modes are not interchangeable. [S1, S2]

## Details
The TypeScript 5.0 release notes describe decorators without `experimentalDecorators` as having different checking and output rules from the legacy mode. That newer mode does not support parameter decorators and is incompatible with `emitDecoratorMetadata`. The older Handbook decorators page explicitly documents the experimental stage-2 implementation. Checking which mode a library expects is essential before reusing its decorator functions. [S1, S2]

## Claims
- id: C1
  claim: "The older Handbook page documents the experimental implementation."
  source: S2
  evidence: "an experimental stage 2 decorators implementation"
- id: C2
  claim: "The modern mode differs in type checking and emitted output."
  source: S1
  evidence: "they will be type-checked and emitted differently"
- id: C3
  claim: "The newer decorator mode does not allow parameter decorators."
  source: S1
  evidence: "it does not allow decorating parameters"

## Sources
- [S1] TypeScript 5.0: Decorators. Microsoft and TypeScript documentation contributors. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html. CC-BY-4.0; license: https://raw.githubusercontent.com/microsoft/TypeScript-Website/v2/LICENSE. Accessed 2026-11-05.
- [S2] Decorators: legacy experimental implementation. Microsoft and TypeScript documentation contributors. https://www.typescriptlang.org/docs/handbook/decorators.html. CC-BY-4.0; license: https://raw.githubusercontent.com/microsoft/TypeScript-Website/v2/LICENSE. Accessed 2026-11-05.

## Attribution and notices
This note is CC BY 4.0. Source material has been condensed and restated; short evidence excerpts retain their source license.

TypeScript Website documentation is CC BY 4.0. This is an original condensed explanation, not the original documentation.
