TypeScript quick fixes for import should suggest closer ones first #120313
Labels
papercut 🩸
A particularly annoying issue impacting someone on the team
typescript
Typescript support issues
upstream-issue-linked
This is an upstream issue that has been reported upstream
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
andURI
or hereIProductConfiguration
: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 fromvscode.d.ts
or evenxterm
. And if there are multiple results like in the screenshot, suggest the one that is closest in distance.The text was updated successfully, but these errors were encountered: