Skip to content

Commit 4c80aa1

Browse files
committed
Clean up comments in tests
1 parent b61eaf7 commit 4c80aa1

File tree

3 files changed

+10
-44
lines changed

3 files changed

+10
-44
lines changed

tests/baselines/reference/callWithSpread2.errors.txt

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,22 @@
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'.
22
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'.
44
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'.
66
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'.
88
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'.
1010
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'.
1212
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.
1717

1818

1919
==== 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-
3020
declare function all(a?: number, b?: number): void;
3121
declare function weird(a?: number | string, b?: number | string): void;
3222
declare function prefix(s: string, a?: number, b?: number): void;

tests/baselines/reference/callWithSpread2.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
//// [callWithSpread2.ts]
2-
// Desired semantics: take type of array that is spread,
3-
// allow it to be applied to a
4-
// *trailing* set of optional parameters whose types match.
5-
// Length is *not* checked, the parameters it's applied to just have to be optional.
6-
7-
// that means that tuples are non-starters because their array element type
8-
// is a union like string | number.
9-
10-
// with exceptions for JS functions that use arguments, or maybe all JS functions
11-
122
declare function all(a?: number, b?: number): void;
133
declare function weird(a?: number | string, b?: number | string): void;
144
declare function prefix(s: string, a?: number, b?: number): void;
@@ -50,10 +40,6 @@ prefix(...tuple)
5040

5141

5242
//// [callWithSpread2.js]
53-
// Desired semantics: take type of array that is spread,
54-
// allow it to be applied to a
55-
// *trailing* set of optional parameters whose types match.
56-
// Length is *not* checked, the parameters it's applied to just have to be optional.
5743
// good
5844
all.apply(void 0, ns);
5945
weird.apply(void 0, ns);

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
1-
// Desired semantics: take type of array that is spread,
2-
// allow it to be applied to a
3-
// *trailing* set of optional parameters whose types match.
4-
// Length is *not* checked, the parameters it's applied to just have to be optional.
5-
6-
// that means that tuples are non-starters because their array element type
7-
// is a union like string | number.
8-
9-
// with exceptions for JS functions that use arguments, or maybe all JS functions
10-
111
declare function all(a?: number, b?: number): void;
122
declare function weird(a?: number | string, b?: number | string): void;
133
declare function prefix(s: string, a?: number, b?: number): void;

0 commit comments

Comments
 (0)