- Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: 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: Symbol NavigationRelates to go-to-definition, find-all-references, highlighting/occurrences.Relates to go-to-definition, find-all-references, highlighting/occurrences.