-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: 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
TypeScript Version: 3.7.2
Search Terms: JSDoc param completions
Code
Caret inside {}:
/**
* @param {}
*/
function f(p) {
}Expected behavior:
When you’re typing the @param tag from left to right, you type the type inside curly braces before typing the param name, p. Expected behavior is that in the half-written code above, you should get type completions inside the curly braces.
Actual behavior:
You get only a completion for p inside the curly braces. If you write the p first (on either the left or right of the curly braces, since we parse JSDoc very loosey goosey), type completions inside the curly braces work fine.
Playground Link: https://www.typescriptlang.org/play/?ssl=1&ssc=1&pln=6&pc=2&useJavaScript=true#code/PQKhFgCgAIWgBADgQwE7ILbQN4F8qzBQBmArgHYDGALgJYD250xAFIgJQ5RS5A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: 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