Fix import statement completions followed by interface declaration - #50350
Conversation
| // includeCompletionsWithSnippetText: true, | ||
| // } | ||
| // }); | ||
| // }); |
There was a problem hiding this comment.
I guess I had previously commented this out while debugging so I could skip straight to the later tests, then forgot to uncomment. Luckily they were all still passing 😅
| // line was parsed as the module specifier of a partially-typed import, e.g. | ||
| // import Foo| | ||
| // interface Blah {} | ||
| // This appears to be a multiline-import, and editors can't replace multiple lines. |
There was a problem hiding this comment.
editors can't replace multiple lines
Is this detail actually relevant to the change? It sounds like even if editors could do that, you would still want to assume that the next line is a separate statement and recover appropriately, right?
There was a problem hiding this comment.
Yeah, fair; but it explains why the failure mode is “no completions” rather than “overwriting later declarations.”
Nathan Shively-Sanders (sandersn)
left a comment
There was a problem hiding this comment.
Basically looks good, but I can't tell if an unclosed import list would behave the same as the two existing test cases.
Fixes #48904