Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review what impact official ES Decorators will have #7

Closed
ste2425 opened this issue Jan 31, 2023 · 2 comments
Closed

Review what impact official ES Decorators will have #7

ste2425 opened this issue Jan 31, 2023 · 2 comments

Comments

@ste2425
Copy link

ste2425 commented Jan 31, 2023

Decorators has reached stage 3 and will/has been implemented for v5 of TypeScript which is set to be released next month.

microsoft/TypeScript#50820

The ES decorators has some breaking changes compared to the legacy experimental decorators implementation.

As this library (we find it very useful BTW) relies on decorators i'm not entirely sure what, if anything, will need to change but its worth a review to check.

I suspect at some point the old decorators will be deprecated in favour of the standard version.

@moshegottlieb
Copy link
Owner

Thanks!
I've seen it in the typescript beta release notes, this is definitely on my todo list.

@moshegottlieb
Copy link
Owner

At the moment, you still need "experimentalDecorators": true and "emitDecoratorMetadata": true in your tsconfig.json.
It will work with newer versions of typescript, but the new decorator syntax would not, these are at the moment mutually exclusive.
If you are using the new style decorators of typescript 5, you may want to move the JSON validation to a different module which do not.
Currently, while exists in the interface, the new decorators bear no metadata about properties, but the documentation suggests this may change in the future.
Until such time arrives, if it ever does, this issue cannot be resolved, and therefore is now closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants