-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Open
Labels
BugA 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.
Description
🔎 Search Terms
"indexed access", "typeof import", reference
🕗 Version & Regression Information
This is the behavior in every version I tried.
⏯ Playground Link
I cannot reproduce this on the typescript playground because it doesn't seem to have a file system.
💻 Code
// imports.d.ts
import * as $0 from "./bar";
declare global {
const foo: typeof import("./foo")["foo"];
const bar: typeof import("./bar")["bar"];
}
export {};// foo.ts
export const foo = 1;// bar.ts
export const bar = 1;🙁 Actual behavior
Triggering Go to References on foo in foo.ts does not result in any references. But triggering on bar in bar.ts, the reference symbol in imports.d.ts is correctly found, as there is an import statement of bar.ts.
🙂 Expected behavior
Triggering Go to References on foo in foo.ts correctly finds the reference symbol in imports.d.ts. Its behavior should be consistent with dot access.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA 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.