You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Slightly improve missing property errors
* Add missing quote
* Fix jsx case
* Add related span
* Fix crash (why can declarations be undefined)
* Only skip top elaboration when no variant message is provided
Copy file name to clipboardExpand all lines: tests/baselines/reference/argumentExpressionContextualTyping.errors.txt
+4-6Lines changed: 4 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,11 @@
1
1
tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(16,5): error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type '[string, number, boolean]'.
2
-
Property '0' is missing in type '(string | number | boolean)[]'.
2
+
Type '(string | number | boolean)[]' is missing the following properties from type '[string, number, boolean]': 0, 1, 2
3
3
tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(17,5): error TS2345: Argument of type '[string, number, true, ...(string | number | boolean)[]]' is not assignable to parameter of type '[string, number, boolean]'.
4
4
Types of property 'length' are incompatible.
5
5
Type 'number' is not assignable to type '3'.
6
6
tests/cases/conformance/expressions/contextualTyping/argumentExpressionContextualTyping.ts(18,5): error TS2345: Argument of type '{ x: (string | number)[]; y: { c: boolean; d: string; e: number; }; }' is not assignable to parameter of type '{ x: [any, any]; y: { c: any; d: any; e: any; }; }'.
7
7
Types of property 'x' are incompatible.
8
-
Type '(string | number)[]' is not assignable to type '[any, any]'.
9
-
Property '0' is missing in type '(string | number)[]'.
8
+
Type '(string | number)[]' is missing the following properties from type '[any, any]': 0, 1
!!! error TS2345: Argument of type '(string | number | boolean)[]' is not assignable to parameter of type '[string, number, boolean]'.
31
-
!!! error TS2345: Property '0' is missing in type '(string | number | boolean)[]'.
30
+
!!! error TS2345: Type '(string | number | boolean)[]' is missing the following properties from type '[string, number, boolean]': 0, 1, 2
32
31
baz(["string", 1, true, ...array]); // Error
33
32
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
33
!!! error TS2345: Argument of type '[string, number, true, ...(string | number | boolean)[]]' is not assignable to parameter of type '[string, number, boolean]'.
0 commit comments