type Decorators = {
version?: 'legacy' | '2022-03';
};
Used to configure the decorators syntax.
'legacy' | '2022-03'
'2022-03'
Specify the decorator syntax version to be used.
If you want to know the differences between different decorators versions, you can refer to: How does this proposal compare to other versions of decorators?
2022-03
corresponds to the Stage 3 decorator proposal, equivalent to the decorator syntax supported by TypeScript 5.0 by default.
export default {
source: {
decorators: {
version: '2022-03',
},
},
};
Reference documentation:
Equivalent to TypeScript's experimentalDecorators: true
.
export default {
source: {
decorators: {
version: 'legacy',
},
},
};
Reference documentation: