Skip to content

Wrong function type when mixing default initialized parameters with regular parameters #11900

@luisabreu

Description

@luisabreu

VS Code does not show the correct parameter types on the tooltip when you mix default initialized parameters with regular parameters. Ex.:

function test(name= "John", age: number){}

The tooltip shown when you put the mouse cursor over test says (name: string, age: number): void instead of (name?:string, age: number).

wrongsignature

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions