Interface: Decorators
用于配置装饰器语法。
Remarks
更多信息请参见 Decorators.version。
Properties
version?
optionalversion?:"legacy"|"2022-03"
指定使用的装饰器语法版本。
Default Value
'2022-03'
Remarks
如果想了解不同装饰器版本之间的差异,可以参考:How does this proposal compare to other versions of decorators?
Examples
'2022-03' 对应 Stage 3 装饰器提案,等同于 TypeScript 5.0 默认支持的装饰器语法。
'legacy' 对应 TypeScript 的 experimentalDecorators: true。