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
+25-25Lines changed: 25 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,25 @@ tests/cases/compiler/strictOptionalProperties1.ts(20,9): error TS2412: Type 'und
5
5
tests/cases/compiler/strictOptionalProperties1.ts(28,9): error TS2412: Type 'undefined' is not assignable to type 'string' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target.
6
6
tests/cases/compiler/strictOptionalProperties1.ts(53,5): error TS2412: Type 'undefined' is not assignable to type 'string' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target.
7
7
tests/cases/compiler/strictOptionalProperties1.ts(60,5): error TS2322: Type 'undefined' is not assignable to type 'string'.
8
-
tests/cases/compiler/strictOptionalProperties1.ts(64,5): error TS2375: Type '[number, string?, string?]' is not assignable to type '[number, string?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
8
+
tests/cases/compiler/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
-
tests/cases/compiler/strictOptionalProperties1.ts(73,5): error TS2375: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
10
+
tests/cases/compiler/strictOptionalProperties1.ts(73,5): error TS2322: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
11
11
Target allows only 3 element(s) but source may have more.
12
-
tests/cases/compiler/strictOptionalProperties1.ts(74,5): error TS2375: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
12
+
tests/cases/compiler/strictOptionalProperties1.ts(74,5): error TS2322: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]'.
13
13
Source provides no match for required element at position 0 in target.
14
-
tests/cases/compiler/strictOptionalProperties1.ts(75,5): error TS2375: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
14
+
tests/cases/compiler/strictOptionalProperties1.ts(75,5): error TS2322: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
15
15
Type at position 1 in source is not compatible with type at position 1 in target.
16
16
Type 'undefined' is not assignable to type 'string'.
17
17
tests/cases/compiler/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.
18
18
Types of property 'foo' are incompatible.
19
19
Type 'undefined' is not assignable to type 'string'.
20
-
tests/cases/compiler/strictOptionalProperties1.ts(105,7): error TS2375: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
20
+
tests/cases/compiler/strictOptionalProperties1.ts(105,7): error TS2322: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]'.
21
21
Type at position 1 in source is not compatible with type at position 1 in target.
22
22
Type 'undefined' is not assignable to type 'string'.
23
-
tests/cases/compiler/strictOptionalProperties1.ts(106,7): error TS2375: Type '[number, string, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
23
+
tests/cases/compiler/strictOptionalProperties1.ts(106,7): error TS2322: Type '[number, string, undefined]' is not assignable to type '[number, string?, boolean?]'.
24
24
Type at position 2 in source is not compatible with type at position 2 in target.
25
25
Type 'undefined' is not assignable to type 'boolean'.
26
-
tests/cases/compiler/strictOptionalProperties1.ts(107,7): error TS2375: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
26
+
tests/cases/compiler/strictOptionalProperties1.ts(107,7): error TS2322: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
27
27
Type at position 1 in source is not compatible with type at position 1 in target.
28
28
Type 'undefined' is not assignable to type 'string'.
29
29
tests/cases/compiler/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.
@@ -118,8 +118,8 @@ tests/cases/compiler/strictOptionalProperties1.ts(195,1): error TS2375: Type '{
118
118
function f4a(t1: [number, string?], t2: [number, string?, string?]) {
119
119
t1 = t2; // Wasn't an error, but should be
120
120
~~
121
-
!!! error TS2375: Type '[number, string?, string?]' is not assignable to type '[number, string?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
122
-
!!! error TS2375: Target allows only 2 element(s) but source may have more.
121
+
!!! error TS2322: Type '[number, string?, string?]' is not assignable to type '[number, string?]'.
122
+
!!! error TS2322: Target allows only 2 element(s) but source may have more.
123
123
}
124
124
125
125
function f5(t: [number, string?, boolean?]) {
@@ -130,17 +130,17 @@ tests/cases/compiler/strictOptionalProperties1.ts(195,1): error TS2375: Type '{
130
130
t = [42, , ,];
131
131
t = [42, , , ,]; // Error
132
132
~
133
-
!!! error TS2375: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
134
-
!!! error TS2375: Target allows only 3 element(s) but source may have more.
133
+
!!! error TS2322: Type '[number, never?, never?, never?]' is not assignable to type '[number, string?, boolean?]'.
134
+
!!! error TS2322: Target allows only 3 element(s) but source may have more.
135
135
t = [, , true]; // Error
136
136
~
137
-
!!! error TS2375: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
138
-
!!! error TS2375: Source provides no match for required element at position 0 in target.
137
+
!!! error TS2322: Type '[never?, never?, true?]' is not assignable to type '[number, string?, boolean?]'.
138
+
!!! error TS2322: Source provides no match for required element at position 0 in target.
139
139
t = [42, undefined, true]; // Error
140
140
~
141
-
!!! error TS2375: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
142
-
!!! error TS2375: Type at position 1 in source is not compatible with type at position 1 in target.
143
-
!!! error TS2375: Type 'undefined' is not assignable to type 'string'.
141
+
!!! error TS2322: Type '[number, undefined, true]' is not assignable to type '[number, string?, boolean?]'.
142
+
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
143
+
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
144
144
}
145
145
146
146
function f6() {
@@ -176,19 +176,19 @@ tests/cases/compiler/strictOptionalProperties1.ts(195,1): error TS2375: Type '{
!!! error TS2375: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
180
-
!!! error TS2375: Type at position 1 in source is not compatible with type at position 1 in target.
181
-
!!! error TS2375: Type 'undefined' is not assignable to type 'string'.
179
+
!!! error TS2322: Type '[number, undefined]' is not assignable to type '[number, string?, boolean?]'.
180
+
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
181
+
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
!!! error TS2375: Type '[number, string, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
185
-
!!! error TS2375: Type at position 2 in source is not compatible with type at position 2 in target.
186
-
!!! error TS2375: Type 'undefined' is not assignable to type 'boolean'.
184
+
!!! error TS2322: Type '[number, string, undefined]' is not assignable to type '[number, string?, boolean?]'.
185
+
!!! error TS2322: Type at position 2 in source is not compatible with type at position 2 in target.
186
+
!!! error TS2322: Type 'undefined' is not assignable to type 'boolean'.
!!! error TS2375: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
190
-
!!! error TS2375: Type at position 1 in source is not compatible with type at position 1 in target.
191
-
!!! error TS2375: Type 'undefined' is not assignable to type 'string'.
189
+
!!! error TS2322: Type '[number, undefined, undefined]' is not assignable to type '[number, string?, boolean?]'.
190
+
!!! error TS2322: Type at position 1 in source is not compatible with type at position 1 in target.
191
+
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
0 commit comments