Skip to content

Only last overload error is shown even with noErrorTruncationΒ #52745

@eps1lon

Description

@eps1lon

Bug Report

πŸ”Ž Search Terms

overload error message

πŸ•— Version & Regression Information

  • I was unable to test this prior to 3.3 because we didn't even have errors for each overload if we had less than 4 overloads

⏯ Playground Link

Playground link with relevant code

Playground link using 3.3

πŸ’» Code

declare function fn3(type: number): void
declare function fn3(type: string): void
declare function fn3(type: Symbol): void

declare function fn4(type: number): void
declare function fn4(type: string): void
declare function fn4(type: Symbol): void
declare function fn4(type: void): void

fn3(true)

fn4(true)

πŸ™ Actual behavior

error message is displayed as

671181234512
declare function fn3(type: number): void
declare function fn3(type: string): void
declare function fn3(type: Symbol): void

declare function fn4(type: number): void
declare function fn4(type: string): void
declare function fn4(type: Symbol): void
declare function fn4(type: void): void

fn3(true)

fn4(true)

No overload matches this call.
The last overload gave the following error.
Argument of type 'boolean' is not assignable to parameter of type 'void'.(2769)
input.tsx(8, 18): The last overload is declared here.


### πŸ™‚ Expected behavior

Since I have `noErrorTruncation` enabled, I expected the error for each overload to be included like I would have, if the function had less than 4 overloads.

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