Skip to content

Incorrect partial union signature matching #5401

@zhuravlikjb

Description

@zhuravlikjb
function g1(b?: string, ...a: string[]) { }
function g2(a?: string, b?: string) { }

var s: typeof g1 | typeof g2;

s("a", "b", "c") // should be an error: 0..2 parameters are allowed

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