ProjectStack
typescript

TS1219: Experimental support for decorators must be enabled in 'experimentalDecorators'

You're using decorator syntax (@ before a class, method, or property) but TypeScript's experimental decorator support isn't enabled in tsconfig.json. Decorators are common in Angular, NestJS, TypeORM, and MobX.

Common causes

  • Using class decorators (@Component, @Injectable, @Entity) without enabling experimentalDecorators
  • Following a framework tutorial that assumes experimental decorators are already on
  • A new tsconfig.json was generated but framework-specific options weren't added
  • tsconfig.json was reset or overwritten and the decorator option was lost

How to fix it

  1. Add to tsconfig.json compilerOptions: { "experimentalDecorators": true }
  2. Also add emitDecoratorMetadata: true if using dependency injection (Angular, NestJS)
  3. Use the framework's recommended tsconfig template — Angular CLI and NestJS CLI generate a correct config
  4. For TypeScript 5.0+, check if your framework supports the new standard decorators proposal

Example

@Injectable() class UserService { } // error TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.

Using NestJS @Injectable() decorator without experimentalDecorators in tsconfig.json

Browse more errors

The Developer Hub covers 150+ errors across Git, npm, Node.js, Python, TypeScript, and Docker — with plain-English explanations and fix steps.