-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Help WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
Description
🔎 Search Terms
TS9005: Declaration emit for this file requires using private name '(Anonymous function)'. An explicit type annotation may unblock declaration emit.
🕗 Version & Regression Information
- Occurs on versions 3.7.5 - nightly
- Related to PR Avoid trying to emit anonymous classish/expando functions as assignments #55472
Related to #55172
When 2 separate nested this
bindings are used within constructor functions, the following error's returned always at the top of the file (this was really annoying to debug 😅)
Declaration emit for this file requires using private name '(Anonymous function)'. An explicit type annotation may unblock declaration emit.
⏯ Playground Link
💻 Code
const a = new function () {
this.b = new function () {
this.c = 1
}
}
🙁 Actual behavior
Complains
🙂 Expected behavior
Shouldn't complain
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Help WantedYou can do thisYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some casesThe current behavior isn't wrong, but it's possible to see that it might be better in some cases