Skip to content

Preserve class bindings in computed member names - #63929

Draft
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 3 commits into
mainfrom
copilot/investigate-decorator-initialization-order
Draft

Preserve class bindings in computed member names#63929
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 3 commits into
mainfrom
copilot/investigate-decorator-initialization-order

Conversation

Copilot AI commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Legacy decorator emit replaced class references in direct computed member names with an alias that is not assigned until class evaluation completes.

@dec
class C {
    [C.name]() {}
}

Changes

  • Preserve the class binding in direct computed member names.
  • Retain alias substitution for deferred references, including nested classes inside methods.
  • Cover methods, accessors, decorated static fields, and ES2020/ES2022 emit.

@typescript-automation typescript-automation Bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Aug 20, 2026
Copilot AI and others added 2 commits August 20, 2026 19:39
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate decorator initialization order re: renames of classes Preserve class bindings in computed member names Aug 20, 2026
Copilot AI linked an issue Aug 20, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Investigate decorator initialization order re: renames of classes

2 participants