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

Decorators normative updates #55276

Merged
merged 1 commit into from Aug 5, 2023
Merged

Decorators normative updates #55276

merged 1 commit into from Aug 5, 2023

Conversation

rbuckton
Copy link
Member

@rbuckton rbuckton commented Aug 4, 2023

This changes our ES decorators emit to match with two normative updates to the Decorators proposal:

  • The this receiver should be preserved when a decorator is called, i.e., when the decorator @foo.bar is invoked, foo should be the this of the bar method.
  • Static accessor fields should use the class reference rather than this when accessing the backing field.

See tc39/proposal-decorators#499 for more information.

Fixes #53752

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 4, 2023
@rbuckton rbuckton merged commit 8fc8c95 into main Aug 5, 2023
18 checks passed
@rbuckton rbuckton deleted the decorators-normative-updates branch August 5, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decorator spec normative changes - static accessors and natural this in decorators
3 participants