Problem with Typegoose's decorators #856
-
Screenshots@typegoose/typegoose's @prop:
My custom @prop: EnvironmentNode: 18.15.0 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
does it work if you use typescript 4.9 or if you use |
Beta Was this translation helpful? Give feedback.
-
For future reference, i could reproduce this problem, it is related to not having
Edit: also as long as the new ES Decorators (stage 3) dont support some kind of metadata support, typegoose will have to rely on |
Beta Was this translation helpful? Give feedback.
For future reference, i could reproduce this problem, it is related to not having
experimentalDecorators
set totrue
(meaning using the new way of decorators with 5.0 and forwards), adding"experimentalDecorators": true
should fix the issuea future version of typegoose may either support both or switch to the new decoratorsEdit:
added a documentation note about this issue
also as long as the new ES Decorators (stage 3) dont support some kind of metadata support, typegoose will have to rely on
experimentalDecorators
(Stage 2), which will seemingly be possible with typescript 5.2 see typescript 5.2 iteration plan and typescript decorator-metadata-proposal implementation PR