Skip to content

Conversation

@rbuckton
Copy link
Contributor

@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

@rbuckton rbuckton requested review from jakebailey and sandersn August 4, 2023 23:39
@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
@rbuckton rbuckton deleted the decorators-normative-updates branch August 5, 2023 00:36
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

4 participants