Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect types from JSDoc /** @type */ tag with rest parameters #39229

Closed
DanielRosenwasser opened this issue Jun 24, 2020 · 0 comments · Fixed by #39473
Closed

Incorrect types from JSDoc /** @type */ tag with rest parameters #39229

DanielRosenwasser opened this issue Jun 24, 2020 · 0 comments · Fixed by #39473
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 24, 2020

// @ts-check

/**
 * @type {(...args: [string, string] | [number, string, string]) => void}
 */
function foo(...args) {
    
}

args somehow has the type string | number.

https://www.typescriptlang.org/v2/play?ts=4.0.0-dev.20200623&ssl=1&ssc=1&pln=7&pc=2&useJavaScript=true#code/PQKhFgCgAIWgBALgTwA4FNoG8AUA6AgQwCcBzAZwC5oBtcxYgSwDtSAaaep1gXWgB9azAK4BbAEbpiHLi3acGcngEpoAXgB80AG4B7RgBMAvlFjAoAM2HMAxoka7m0C7t34iZclFVZT0f1BGQA

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jun 25, 2020
@ahejlsberg ahejlsberg added Bug A bug in TypeScript and removed Needs Investigation This issue needs a team member to investigate its status. labels Jul 7, 2020
@ahejlsberg ahejlsberg added this to the Typescript 4.0.1 milestone Jul 7, 2020
@ahejlsberg ahejlsberg added the Fix Available A PR has been opened for this issue label Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants