Duplicate import path completions when multiple root directories are present #57368
Labels
Bug
A bug in TypeScript
Domain: Completion Lists
The issue relates to showing completion lists in an editor
Milestone
🔎 Search Terms
autocomplete, duplicate suggestions, duplicate imports, root dirs
🕗 Version & Regression Information
💻 Code
When rootDirs are
src/
andbuild/dts
, and the directory structure is following:🙁 Actual behavior
Import completions when invoked from
index.ts
(usingimport {} from "./
) have a duplicate entry fordir
🙂 Expected behavior
Only a single entry for
dir
is present.Additional information about the issue
The bug occurs because when we're combining completions from the point of view of each root dir, we're not deduplicating the entries.
This issue has existed for a long time, but it was made more obvious after #55233 fixed a related bug.
The text was updated successfully, but these errors were encountered: