-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Errant case causes crash in switch/case snippet completions #55946
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
switch (Math.random() ? 123 : 456) {
case "oops!":
case$
}Ensure you have snippet completions enabled and request completions at $.
Request completion entry details for the snippet completion case 123...
TypeError: Cannot destructure property 'entry' of 'getExhaustiveCaseSnippets(...)' as it is undefined.
at Object.getCompletionEntryDetails (.../node_modules/typescript/lib/tsserver.js:158306:15)
at Object.getCompletionEntryDetails2 [as getCompletionEntryDetails] (.../node_modules/typescript/lib/tsserver.js:144582:35)
at .../node_modules/typescript/lib/tsserver.js:184151:43
at mapDefined (.../node_modules/typescript/lib/tsserver.js:2668:22)
at IpcIOSession.getCompletionEntryDetails (.../node_modules/typescript/lib/tsserver.js:184149:20)
at completionEntryDetails (.../node_modules/typescript/lib/tsserver.js:182478:43)
at .../node_modules/typescript/lib/tsserver.js:184857:69
at IpcIOSession.executeWithRequestId (.../node_modules/typescript/lib/tsserver.js:184849:14)
at IpcIOSession.executeCommand (.../node_modules/typescript/lib/tsserver.js:184857:29)
at IpcIOSession.onMessage (.../node_modules/typescript/lib/tsserver.js:184899:51)
at process.<anonymous> (.../node_modules/typescript/lib/tsserver.js:186480:14)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issueA PR has been opened for this issue