Skip to content

JSDoc param type completions broken before typing param name #35582

@andrewbranch

Description

@andrewbranch

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

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions