mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
41 lines
2.4 KiB
Plaintext
41 lines
2.4 KiB
Plaintext
heterogeneousArrayAndOverloads.ts(9,20): error TS2769: No overload matches this call.
|
|
The last overload gave the following error.
|
|
Type 'number' is not assignable to type 'string'.
|
|
heterogeneousArrayAndOverloads.ts(9,23): error TS2769: No overload matches this call.
|
|
The last overload gave the following error.
|
|
Type 'number' is not assignable to type 'string'.
|
|
heterogeneousArrayAndOverloads.ts(9,32): error TS2769: No overload matches this call.
|
|
The last overload gave the following error.
|
|
Type 'number' is not assignable to type 'string'.
|
|
|
|
|
|
==== heterogeneousArrayAndOverloads.ts (3 errors) ====
|
|
class arrTest {
|
|
test(arg1: number[]);
|
|
test(arg1: string[]);
|
|
test(arg1: any[]) { }
|
|
callTest() {
|
|
this.test([1, 2, 3, 5]);
|
|
this.test(["hi"]);
|
|
this.test([]);
|
|
this.test([1, 2, "hi", 5]); // Error
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
!!! related TS2771 heterogeneousArrayAndOverloads.ts:3:5: The last overload is declared here.
|
|
!!! related TS2793 heterogeneousArrayAndOverloads.ts:4:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
!!! related TS2771 heterogeneousArrayAndOverloads.ts:3:5: The last overload is declared here.
|
|
!!! related TS2793 heterogeneousArrayAndOverloads.ts:4:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
!!! related TS2771 heterogeneousArrayAndOverloads.ts:3:5: The last overload is declared here.
|
|
!!! related TS2793 heterogeneousArrayAndOverloads.ts:4:5: The call would have succeeded against this implementation, but implementation signatures of overloads are not externally visible.
|
|
}
|
|
} |