Repository navigation
Don’t offer import statement completions at from position - #44125
Andrew Branch (andrewbranch) merged 2 commits into
Conversation
| return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; | ||
| } | ||
|
|
||
| function specificKeywordCompletionInfo(keywords: readonly SyntaxKind[]): CompletionInfo { |
|
|
||
| function specificKeywordCompletionInfo(keywords: readonly SyntaxKind[]): CompletionInfo { | ||
| return { | ||
| isGlobalCompletion: true, |
There was a problem hiding this comment.
I tried making this false but the snippets for for loops and stuff still showed up 🤔
There was a problem hiding this comment.
Should it be false then?
Matt Bierner (@mjbvz) any idea why that might be happening?
There was a problem hiding this comment.
Set to false now despite seeing no difference locally
Daniel Rosenwasser (DanielRosenwasser)
left a comment
There was a problem hiding this comment.
Seems right, but I feel like you should specify isGlobalCompletions as false (or at least get clarity on behavior), and you could also just switch to a cheaper lookup for name.
Once that's done, we can cherry-pick into release-4.3.
|
TypeScript Bot (@typescript-bot) cherry-pick this to release-4.3 |
|
Heya Andrew Branch (@andrewbranch), I've started to run the task to cherry-pick this into |
|
Hey Andrew Branch (@andrewbranch), I've opened #44136 for you. |

❗ Hoping to get this fix into for 4.3. The current state is pretty disruptive if your muscle memory expects a completion for
frombut you get an import completion instead.Fixes this:
By making it this: