-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed as not planned
Closed as not planned
Copy link
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: LS: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Relates to go-to-definition, find-all-references, highlighting/occurrences.Help WantedYou can do thisYou can do this
Milestone
Description
🔎 Search Terms
"constructor"
🕗 Version & Regression Information
- This changed between versions v5.6 and v5.8.3
- This changed in commit or PR Implement "Arbitrary Module Namespace Identifiers" #58640
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about constructor
⏯ Playground Link
💻 Code
class A {
'constructor'() { }
}
const a = new A()
console.log(a.constructor)🙁 Actual behavior
Open the console and place the cursor on the constructor in the last line, will throw this error:
🙂 Expected behavior
No error is expected
Additional information about the issue
TypeScript/src/services/findAllReferences.ts
Lines 1840 to 1841 in dd1e258
| const str = node as StringLiteralLike; | |
| return str.text.length === searchSymbolName.length && ( |
Here, str is a TokenObject, it doesn't have a text property.

RyanCavanaugh and a-tarasyuk
Metadata
Metadata
Assignees
Labels
7.0 LS MigrationBugA bug in TypeScriptA bug in TypeScriptDomain: LS: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Relates to go-to-definition, find-all-references, highlighting/occurrences.Help WantedYou can do thisYou can do this