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
Copy file name to clipboardExpand all lines: tests/baselines/reference/strictOptionalProperties1.errors.txt
+14-20Lines changed: 14 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -7,31 +7,28 @@ strictOptionalProperties1.ts(53,5): error TS2412: Type 'undefined' is not assign
7
7
strictOptionalProperties1.ts(60,5): error TS2322: Type 'undefined' is not assignable to type 'string'.
8
8
strictOptionalProperties1.ts(64,5): error TS2322: Type '[number, string?, string?]' is not assignable to type '[number, string?]'.
9
9
Target allows only 2 element(s) but source may have more.
10
-
strictOptionalProperties1.ts(71,5): error TS2322: Type '[number, never?]' is not assignable to type '[number, string?, boolean?]'.
10
+
strictOptionalProperties1.ts(71,5): error TS2322: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]'.
11
11
Type at position 1 in source is not compatible with type at position 1 in target.
12
12
Type 'undefined' is not assignable to type 'string'.
13
-
strictOptionalProperties1.ts(72,5): error TS2322: Type '[number, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
13
+
strictOptionalProperties1.ts(72,5): error TS2322: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
14
14
Type at position 1 in source is not compatible with type at position 1 in target.
15
15
Type 'undefined' is not assignable to type 'string'.
16
-
strictOptionalProperties1.ts(73,5): error TS2322: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
17
-
Target allows only 3 element(s) but source may have more.
18
-
strictOptionalProperties1.ts(74,5): error TS2322: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]'.
19
-
Source provides no match for required element at position 0 in target.
16
+
strictOptionalProperties1.ts(73,5): error TS2322: Type '[number, undefined, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
17
+
Source has 4 element(s) but target allows only 3.
18
+
strictOptionalProperties1.ts(74,5): error TS2322: Type '[undefined, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
19
+
Type at position 0 in source is not compatible with type at position 0 in target.
20
+
Type 'undefined' is not assignable to type 'number'.
20
21
strictOptionalProperties1.ts(75,5): error TS2322: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
21
22
Type at position 1 in source is not compatible with type at position 1 in target.
22
23
Type 'undefined' is not assignable to type 'string'.
23
24
strictOptionalProperties1.ts(99,7): error TS2375: Type '{ foo: undefined; bar: string; }' is not assignable to type 'InputProps' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
24
25
Types of property 'foo' are incompatible.
25
26
Type 'undefined' is not assignable to type 'string'.
26
27
strictOptionalProperties1.ts(105,7): error TS2322: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]'.
27
-
Type at position 1 in source is not compatible with type at position 1 in target.
28
-
Type 'undefined' is not assignable to type 'string'.
29
28
strictOptionalProperties1.ts(106,7): error TS2322: Type '[number, string, undefined]' is not assignable to type '[number, string?, boolean?]'.
30
29
Type at position 2 in source is not compatible with type at position 2 in target.
31
30
Type 'undefined' is not assignable to type 'boolean'.
32
31
strictOptionalProperties1.ts(107,7): error TS2322: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
33
-
Type at position 1 in source is not compatible with type at position 1 in target.
34
-
Type 'undefined' is not assignable to type 'string'.
35
32
strictOptionalProperties1.ts(111,7): error TS2375: Type '{ foo: undefined; }' is not assignable to type '{ foo?: number; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
36
33
Types of property 'foo' are incompatible.
37
34
Type 'undefined' is not assignable to type 'number'.
@@ -142,22 +139,23 @@ strictOptionalProperties1.ts(211,1): error TS2322: Type 'string | boolean | unde
142
139
t = [42, 'abc', true];
143
140
t = [42, ,];
144
141
~
145
-
!!! error TS2322: Type '[number, never?]' is not assignable to type '[number, string?, boolean?]'.
142
+
!!! error TS2322: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]'.
146
143
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
147
144
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
148
145
t = [42, , ,];
149
146
~
150
-
!!! error TS2322: Type '[number, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
147
+
!!! error TS2322: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
151
148
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
152
149
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
153
150
t = [42, , , ,]; // Error
154
151
~
155
-
!!! error TS2322: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
156
-
!!! error TS2322: Target allows only 3 element(s) but source may have more.
152
+
!!! error TS2322: Type '[number, undefined, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
153
+
!!! error TS2322: Source has 4 element(s) but target allows only 3.
157
154
t = [, , true]; // Error
158
155
~
159
-
!!! error TS2322: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]'.
160
-
!!! error TS2322: Source provides no match for required element at position 0 in target.
156
+
!!! error TS2322: Type '[undefined, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
157
+
!!! error TS2322: Type at position 0 in source is not compatible with type at position 0 in target.
158
+
!!! error TS2322: Type 'undefined' is not assignable to type 'number'.
161
159
t = [42, undefined, true]; // Error
162
160
~
163
161
!!! error TS2322: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
@@ -199,8 +197,6 @@ strictOptionalProperties1.ts(211,1): error TS2322: Type 'string | boolean | unde
0 commit comments