2 ms·
Decorators in TypeScript is still an experimental feature which may change depending on if/how it's implemented in JavaScript. > To enable experimental support
by lioeters 4y ago
Decorators in TypeScript is still an experimental feature which may change depending on if/how it's implemented in JavaScript.
> To enable experimental support for decorators, you must enable the experimentalDecorators compiler option either on the command line or in your tsconfig.json
https://www.typescriptlang.org/docs/handbook/decorators.html https://www.typescriptlang.org/docs/handbook/decorators.html
> ..the current decorators proposal, which is a work in progress
https://github.com/tc39/proposal-decorators https://github.com/tc39/proposal-decorators
Oh, but I see that the proposal is now at Stage 3, which means the specs and syntax are stable ("completely described") and ready for browsers to implement.
On further digging, it seems decorators will be a standard feature included in TypeScript 5.0 planned for release on March 14th.
TypeScript 5.0 Iteration Plan - https://github.com/microsoft/TypeScript/issues/51362 https://github.com/microsoft/TypeScript/issues/51362