|
| 1 | +tests/cases/conformance/types/union/unionTypeCallSignatures4.ts(10,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 2 | +tests/cases/conformance/types/union/unionTypeCallSignatures4.ts(20,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 3 | +tests/cases/conformance/types/union/unionTypeCallSignatures4.ts(23,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 4 | +tests/cases/conformance/types/union/unionTypeCallSignatures4.ts(25,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 5 | + |
| 6 | + |
| 7 | +==== tests/cases/conformance/types/union/unionTypeCallSignatures4.ts (4 errors) ==== |
| 8 | + type F1 = (a: string, b?: string) => void; |
| 9 | + type F2 = (a: string, b?: string, c?: string) => void; |
| 10 | + type F3 = (a: string, ...rest: string[]) => void; |
| 11 | + type F4 = (a: string, b?: string, ...rest: string[]) => void; |
| 12 | + type F5 = (a: string, b: string) => void; |
| 13 | + |
| 14 | + var f12: F1 | F2; |
| 15 | + f12("a"); |
| 16 | + f12("a", "b"); |
| 17 | + f12("a", "b", "c"); // error |
| 18 | + ~~~~~~~~~~~~~~~~~~ |
| 19 | +!!! error TS2346: Supplied parameters do not match any signature of call target. |
| 20 | + |
| 21 | + var f34: F3 | F4; |
| 22 | + f34("a"); |
| 23 | + f34("a", "b"); |
| 24 | + f34("a", "b", "c"); |
| 25 | + |
| 26 | + var f1234: F1 | F2 | F3 | F4; |
| 27 | + f1234("a"); |
| 28 | + f1234("a", "b"); |
| 29 | + f1234("a", "b", "c"); // error |
| 30 | + ~~~~~~~~~~~~~~~~~~~~ |
| 31 | +!!! error TS2346: Supplied parameters do not match any signature of call target. |
| 32 | + |
| 33 | + var f12345: F1 | F2 | F3 | F4 | F5; |
| 34 | + f12345("a"); // error |
| 35 | + ~~~~~~~~~~~ |
| 36 | +!!! error TS2346: Supplied parameters do not match any signature of call target. |
| 37 | + f12345("a", "b"); |
| 38 | + f12345("a", "b", "c"); // error |
| 39 | + ~~~~~~~~~~~~~~~~~~~~~ |
| 40 | +!!! error TS2346: Supplied parameters do not match any signature of call target. |
| 41 | + |
0 commit comments