Skip to content

Problem with Typegoose's decorators #856

Closed Answered by hasezoey
angelhdzmultimedia asked this question in Q&A
Discussion options

You must be logged in to vote

For future reference, i could reproduce this problem, it is related to not having experimentalDecorators set to true (meaning using the new way of decorators with 5.0 and forwards), adding "experimentalDecorators": true should fix the issue

a future version of typegoose may either support both or switch to the new decorators

Edit:
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

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@angelhdzmultimedia
Comment options

Comment options

You must be logged in to vote
1 reply
@angelhdzmultimedia
Comment options

Answer selected by angelhdzmultimedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants