Skip to content

(...args: never) => void signature throws an error in TS 5.1 #54543

Closed as not planned
@anthonyma94

Description

@anthonyma94

Playground

If I have a function with the signature of (...args: never) => void, TypeScript 5.1 now throws this error:

Argument of type '[]' is not assignable to parameter of type 'never'.

Previous versions of TypeScript allows me to call the function without any parameters.

Is this intended behaviour? I don't believe seeing anything in the changelog mentioning this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions