Skip to content

Error message of spread arguments should be got 0 or more #20097

@falsandtru

Description

@falsandtru

TypeScript Version: master

Code

declare function f(): void;
f(...[]);

Expected behavior:

$ node built/local/tsc.js index.ts
index.ts(2,1): error TS2556: Expected 0 arguments, but got 0 or more.

Actual behavior:

$ node built/local/tsc.js index.ts
index.ts(2,1): error TS2556: Expected 0 arguments, but got 1 or more.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions