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

Future support of decorator when Typescript complies with the Javascript TC39 proposal #5030

Closed
skyzhangty opened this issue Jul 4, 2020 · 4 comments
Labels
needs triage This issue has not been looked into type: question 🙌

Comments

@skyzhangty
Copy link

skyzhangty commented Jul 4, 2020

Hello,

I do enjoy using the framework. My only concern is the plan of future support of decorators. 

Currently, a decorator in Typescript is just another function, which is the first draft of the decorator proposal. 

The proposal has been changed dramatically since and Typescript will not follow the proposal until it reaches stage 3. 

I am wondering if the Nest team has any plan for decorators if Typescript decides to comply with the Javascript proposal. 

Or even worse decorators will never be accepted to the final stage and typescript deprecates it.

Thank you very much for your feedback.
@skyzhangty skyzhangty added needs triage This issue has not been looked into type: question 🙌 labels Jul 4, 2020
@jmcdo29
Copy link
Member

jmcdo29 commented Jul 5, 2020

My two cents on this, Typescript most likely won't deprecate decorators due to frameworks like Nest, Angular, TypeORM, class-*, and others. There's too many libraries that already rely on such features that are widely used as if decorators were already a part of the spec. I assume if things end up drastically changing, plans will be made to accommodate the spec.

@kamilmysliwiec
Copy link
Member

As @jmcdo29 mentioned, deprecating decorators would affect a lot of popular TS packages (probably the majority of the most popular ones). There's simply no reason for that. If anything changes, we'll accommodate the spec.

@arthu
Copy link

arthu commented May 22, 2023

just found this thread! It looks like Typescript 5 has adopted stage 3 decorator, still support stage 1 when experimentalDecorators is turned on. I was wondering what's the plan to adopt stage 3 in nestjs

@micalevisk
Copy link
Member

@arthu See #11414 (comment)

@nestjs nestjs locked and limited conversation to collaborators May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue has not been looked into type: question 🙌
Projects
None yet
Development

No branches or pull requests

5 participants