mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-06 03:56:15 -05:00
Correct test argument in callwithSpread2
This commit is contained in:
@@ -11,12 +11,11 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(34,11): err
|
||||
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(35,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
||||
Type 'string' is not assignable to type 'number'.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,11): error TS2461: Type '(a?: number, b?: number) => void' is not an array type.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(37,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (10 errors) ====
|
||||
==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (9 errors) ====
|
||||
declare function all(a?: number, b?: number): void;
|
||||
declare function weird(a?: number | string, b?: number | string): void;
|
||||
declare function prefix(s: string, a?: number, b?: number): void;
|
||||
@@ -70,11 +69,9 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): erro
|
||||
~~~~~~~~
|
||||
!!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
||||
!!! error TS2345: Type 'string' is not assignable to type 'number'.
|
||||
prefix(...all) // required parameters are required
|
||||
~~~~~~~~~~~~~~
|
||||
prefix(...ns) // required parameters are required
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
~~~
|
||||
!!! error TS2461: Type '(a?: number, b?: number) => void' is not an array type.
|
||||
prefix(...mixed)
|
||||
~~~~~~~~~~~~~~~~
|
||||
!!! error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
@@ -34,7 +34,7 @@ prefix("b", ...mixed)
|
||||
prefix("c", ...tuple)
|
||||
rest("e", ...mixed)
|
||||
rest("f", ...tuple)
|
||||
prefix(...all) // required parameters are required
|
||||
prefix(...ns) // required parameters are required
|
||||
prefix(...mixed)
|
||||
prefix(...tuple)
|
||||
|
||||
@@ -61,6 +61,6 @@ prefix.apply(void 0, ["b"].concat(mixed));
|
||||
prefix.apply(void 0, ["c"].concat(tuple));
|
||||
rest.apply(void 0, ["e"].concat(mixed));
|
||||
rest.apply(void 0, ["f"].concat(tuple));
|
||||
prefix.apply(void 0, all); // required parameters are required
|
||||
prefix.apply(void 0, ns); // required parameters are required
|
||||
prefix.apply(void 0, mixed);
|
||||
prefix.apply(void 0, tuple);
|
||||
|
||||
@@ -33,6 +33,6 @@ prefix("b", ...mixed)
|
||||
prefix("c", ...tuple)
|
||||
rest("e", ...mixed)
|
||||
rest("f", ...tuple)
|
||||
prefix(...all) // required parameters are required
|
||||
prefix(...ns) // required parameters are required
|
||||
prefix(...mixed)
|
||||
prefix(...tuple)
|
||||
|
||||
Reference in New Issue
Block a user