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
Elaborate into arrow return expressions and array types (#27040)
* Dive into simple arrow functions when elaborating errors
* Dive into array literals as though they were tuples when elaborating, if possible
* Make parameter required
* Remove misleading errors by deeply tuplefying
* Remove lib related spans
Copy file name to clipboardExpand all lines: tests/baselines/reference/arrayLiteralTypeInference.errors.txt
+19-17
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
tests/cases/compiler/arrayLiteralTypeInference.ts(14,14): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type 'Action[]'.
2
-
Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type 'Action'.
3
-
Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'.
4
-
Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'.
5
-
tests/cases/compiler/arrayLiteralTypeInference.ts(31,18): error TS2322: Type '({ id: number; trueness: boolean; } | { id: number; name: string; })[]' is not assignable to type '{ id: number; }[]'.
6
-
Type '{ id: number; trueness: boolean; } | { id: number; name: string; }' is not assignable to type '{ id: number; }'.
7
-
Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'.
8
-
Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'.
1
+
tests/cases/compiler/arrayLiteralTypeInference.ts(14,14): error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type 'Action'.
2
+
Object literal may only specify known properties, and 'trueness' does not exist in type 'Action'.
3
+
tests/cases/compiler/arrayLiteralTypeInference.ts(15,14): error TS2322: Type '{ id: number; name: string; }' is not assignable to type 'Action'.
4
+
Object literal may only specify known properties, and 'name' does not exist in type 'Action'.
5
+
tests/cases/compiler/arrayLiteralTypeInference.ts(31,18): error TS2322: Type '{ id: number; trueness: boolean; }' is not assignable to type '{ id: number; }'.
6
+
Object literal may only specify known properties, and 'trueness' does not exist in type '{ id: number; }'.
7
+
tests/cases/compiler/arrayLiteralTypeInference.ts(32,18): error TS2322: Type '{ id: number; name: string; }' is not assignable to type '{ id: number; }'.
8
+
Object literal may only specify known properties, and 'name' does not exist in type '{ id: number; }'.
0 commit comments