|
1 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(40,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 1 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(30,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
2 | 2 | Type 'string' is not assignable to type 'number'.
|
3 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(41,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 3 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(31,5): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
4 | 4 | Type 'string' is not assignable to type 'number'.
|
5 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(42,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 5 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(32,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
6 | 6 | Type 'string' is not assignable to type 'number'.
|
7 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(43,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 7 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(33,13): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
8 | 8 | Type 'string' is not assignable to type 'number'.
|
9 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(44,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 9 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(34,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
10 | 10 | Type 'string' is not assignable to type 'number'.
|
11 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(45,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
| 11 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(35,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. |
12 | 12 | Type 'string' is not assignable to type 'number'.
|
13 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(46,1): error TS2346: Supplied parameters do not match any signature of call target. |
14 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(46,11): error TS2461: Type '(a?: number, b?: number) => void' is not an array type. |
15 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(47,1): error TS2346: Supplied parameters do not match any signature of call target. |
16 |
| -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(48,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 13 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 14 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,11): error TS2461: Type '(a?: number, b?: number) => void' is not an array type. |
| 15 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(37,1): error TS2346: Supplied parameters do not match any signature of call target. |
| 16 | +tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): error TS2346: Supplied parameters do not match any signature of call target. |
17 | 17 |
|
18 | 18 |
|
19 | 19 | ==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (10 errors) ====
|
20 |
| - // Desired semantics: take type of array that is spread, |
21 |
| - // allow it to be applied to a |
22 |
| - // *trailing* set of optional parameters whose types match. |
23 |
| - // Length is *not* checked, the parameters it's applied to just have to be optional. |
24 |
| - |
25 |
| - // that means that tuples are non-starters because their array element type |
26 |
| - // is a union like string | number. |
27 |
| - |
28 |
| - // with exceptions for JS functions that use arguments, or maybe all JS functions |
29 |
| - |
30 | 20 | declare function all(a?: number, b?: number): void;
|
31 | 21 | declare function weird(a?: number | string, b?: number | string): void;
|
32 | 22 | declare function prefix(s: string, a?: number, b?: number): void;
|
|
0 commit comments