microsoft / microsoft/TypeScript
Wrong `super` in class element decorator
Open
@rbuckton is already working on this.
Since Feb 21, 2024.
Needs Investigation
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.4k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
🔎 Search Terms
super decorators
🕗 Version & Regression Information
- This is the behavior in every version I tried
⏯ Playground Link
💻 Code
I'm targeting ESNext
class A extends class { a(_1: any, _2: any) { console.log("super.a") } } {
foo() {
let after = () => {};
class B {
@super.a f = "";
}
after();
}
}
new A().foo();
🙁 Actual behavior
Running the output throws super.a is not a function
🙂 Expected behavior
The output code should log "super.a"
Additional information about the issue
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.