Skip to content

Commit cefcc66

Browse files
committed
Correct test argument in callwithSpread2
1 parent 4c80aa1 commit cefcc66

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

tests/baselines/reference/callWithSpread2.errors.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(34,11): err
1111
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(35,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'.
1212
Type 'string' is not assignable to type 'number'.
1313
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.
1514
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(37,1): error TS2346: Supplied parameters do not match any signature of call target.
1615
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): error TS2346: Supplied parameters do not match any signature of call target.
1716

1817

19-
==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (10 errors) ====
18+
==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (9 errors) ====
2019
declare function all(a?: number, b?: number): void;
2120
declare function weird(a?: number | string, b?: number | string): void;
2221
declare function prefix(s: string, a?: number, b?: number): void;
@@ -70,11 +69,9 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): erro
7069
~~~~~~~~
7170
!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'.
7271
!!! error TS2345: Type 'string' is not assignable to type 'number'.
73-
prefix(...all) // required parameters are required
74-
~~~~~~~~~~~~~~
72+
prefix(...ns) // required parameters are required
73+
~~~~~~~~~~~~~
7574
!!! error TS2346: Supplied parameters do not match any signature of call target.
76-
~~~
77-
!!! error TS2461: Type '(a?: number, b?: number) => void' is not an array type.
7875
prefix(...mixed)
7976
~~~~~~~~~~~~~~~~
8077
!!! error TS2346: Supplied parameters do not match any signature of call target.

tests/baselines/reference/callWithSpread2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ prefix("b", ...mixed)
3434
prefix("c", ...tuple)
3535
rest("e", ...mixed)
3636
rest("f", ...tuple)
37-
prefix(...all) // required parameters are required
37+
prefix(...ns) // required parameters are required
3838
prefix(...mixed)
3939
prefix(...tuple)
4040

@@ -61,6 +61,6 @@ prefix.apply(void 0, ["b"].concat(mixed));
6161
prefix.apply(void 0, ["c"].concat(tuple));
6262
rest.apply(void 0, ["e"].concat(mixed));
6363
rest.apply(void 0, ["f"].concat(tuple));
64-
prefix.apply(void 0, all); // required parameters are required
64+
prefix.apply(void 0, ns); // required parameters are required
6565
prefix.apply(void 0, mixed);
6666
prefix.apply(void 0, tuple);

tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ prefix("b", ...mixed)
3333
prefix("c", ...tuple)
3434
rest("e", ...mixed)
3535
rest("f", ...tuple)
36-
prefix(...all) // required parameters are required
36+
prefix(...ns) // required parameters are required
3737
prefix(...mixed)
3838
prefix(...tuple)

0 commit comments

Comments
 (0)