Skip to content

docCommentTemplate Should Annotate Type of ...parameters in JavaScript #14277

@mjbvz

Description

@mjbvz

TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)

Code

In a js file

|
function first(x, ...rest) {
    return x;
}

Request a docCommentTemplate from TSServer at the |

Expected behavior:

The documentation template annotates the type of rest with ...*

/**
 * 
 * @param {*} x 
 * @param {...*} args 
 */
function first(x, ...rest) {
    return x;
}

Actual behavior:
rest is annotated using *

/**
 * 
 * @param {*} x 
 * @param {*} rest 
 */
function first(x, ...rest) {
    return x;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do thisVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions