Skip to content

TypeScript quick fixes for import should suggest closer ones first #120313

@bpasero

Description

@bpasero

I often see TypeScript suggesting or auto-importing a type from a totally different module that is unrelated to my current one. Popular examples are Disposable and URI or here IProductConfiguration:

image

It would be great if TS could be smart and suggest the right import first based on where I am at. E.g. when I am in a vs/... module, do not suggest imports from vscode.d.ts or even xterm. And if there are multiple results like in the screenshot, suggest the one that is closest in distance.

Metadata

Metadata

Assignees

Labels

papercut 🩸A particularly annoying issue impacting someone on the teamtypescriptTypescript support issuesupstream-issue-linkedThis is an upstream issue that has been reported upstream

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions