Skip to content

Commit 1cd5b0a

Browse files
committed
Accept new baselines
1 parent 868e854 commit 1cd5b0a

5 files changed

+12
-34
lines changed

tests/baselines/reference/baseClassImprovedMismatchErrors.errors.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(8,5): error TS2416: Prop
22
Type 'string | Derived' is not assignable to type 'string | Base'.
33
Type 'Derived' is not assignable to type 'string | Base'.
44
Type 'Derived' is not assignable to type 'Base'.
5-
Types of property 'n' are incompatible.
6-
Type 'string | Derived' is not assignable to type 'string | Base'.
7-
Type 'Derived' is not assignable to type 'string | Base'.
5+
The types returned by 'fn()' are incompatible between these types.
6+
Type 'string | number' is not assignable to type 'number'.
7+
Type 'string' is not assignable to type 'number'.
88
tests/cases/compiler/baseClassImprovedMismatchErrors.ts(9,5): error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'.
99
Type '() => string | number' is not assignable to type '() => number'.
1010
Type 'string | number' is not assignable to type 'number'.
@@ -13,9 +13,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(14,5): error TS2416: Pro
1313
Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
1414
Type 'DerivedInterface' is not assignable to type 'string | Base'.
1515
Type 'DerivedInterface' is not assignable to type 'Base'.
16-
Types of property 'n' are incompatible.
17-
Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
18-
Type 'DerivedInterface' is not assignable to type 'string | Base'.
16+
The types returned by 'fn()' are incompatible between these types.
17+
Type 'string | number' is not assignable to type 'number'.
18+
Type 'string' is not assignable to type 'number'.
1919
tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'.
2020
Type '() => string | number' is not assignable to type '() => number'.
2121
Type 'string | number' is not assignable to type 'number'.
@@ -36,9 +36,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro
3636
!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'.
3737
!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'.
3838
!!! error TS2416: Type 'Derived' is not assignable to type 'Base'.
39-
!!! error TS2416: Types of property 'n' are incompatible.
40-
!!! error TS2416: Type 'string | Derived' is not assignable to type 'string | Base'.
41-
!!! error TS2416: Type 'Derived' is not assignable to type 'string | Base'.
39+
!!! error TS2416: The types returned by 'fn()' are incompatible between these types.
40+
!!! error TS2416: Type 'string | number' is not assignable to type 'number'.
41+
!!! error TS2416: Type 'string' is not assignable to type 'number'.
4242
fn() {
4343
~~
4444
!!! error TS2416: Property 'fn' in type 'Derived' is not assignable to the same property in base type 'Base'.
@@ -55,9 +55,9 @@ tests/cases/compiler/baseClassImprovedMismatchErrors.ts(15,5): error TS2416: Pro
5555
!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
5656
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'.
5757
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'Base'.
58-
!!! error TS2416: Types of property 'n' are incompatible.
59-
!!! error TS2416: Type 'string | DerivedInterface' is not assignable to type 'string | Base'.
60-
!!! error TS2416: Type 'DerivedInterface' is not assignable to type 'string | Base'.
58+
!!! error TS2416: The types returned by 'fn()' are incompatible between these types.
59+
!!! error TS2416: Type 'string | number' is not assignable to type 'number'.
60+
!!! error TS2416: Type 'string' is not assignable to type 'number'.
6161
fn() {
6262
~~
6363
!!! error TS2416: Property 'fn' in type 'DerivedInterface' is not assignable to the same property in base type 'Base'.

tests/baselines/reference/classPropertyErrorOnNameOnly.errors.txt

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ tests/cases/compiler/classPropertyErrorOnNameOnly.ts(7,3): error TS2322: Type '(
33
Type 'undefined' is not assignable to type 'string'.
44
tests/cases/compiler/classPropertyErrorOnNameOnly.ts(24,7): error TS2322: Type '(val: Values) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'FuncType'.
55
Type '"1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'string'.
6-
Type 'undefined' is not assignable to type 'string'.
76

87

98
==== tests/cases/compiler/classPropertyErrorOnNameOnly.ts (2 errors) ====
@@ -38,7 +37,6 @@ tests/cases/compiler/classPropertyErrorOnNameOnly.ts(24,7): error TS2322: Type '
3837
~~~~~~~~~~~~
3938
!!! error TS2322: Type '(val: Values) => "1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'FuncType'.
4039
!!! error TS2322: Type '"1" | "2" | "3" | "4" | "5" | undefined' is not assignable to type 'string'.
41-
!!! error TS2322: Type 'undefined' is not assignable to type 'string'.
4240
switch (val) {
4341
case 1:
4442
return "1";

tests/baselines/reference/keyofAndIndexedAccessErrors.errors.txt

-14
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(64,33): error
2222
Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
2323
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(66,24): error TS2345: Argument of type '"size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
2424
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(67,24): error TS2345: Argument of type '"name" | "size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
25-
Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
2625
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(73,5): error TS2536: Type 'keyof T | keyof U' cannot be used to index type 'T | U'.
2726
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(74,5): error TS2536: Type 'keyof T | keyof U' cannot be used to index type 'T | U'.
2827
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(82,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
@@ -34,14 +33,8 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(82,5): error
3433
Type 'string | number | symbol' is not assignable to type 'keyof U'.
3534
Type 'string' is not assignable to type 'keyof U'.
3635
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(83,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
37-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
38-
Type 'keyof T' is not assignable to type 'keyof U'.
3936
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(86,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
40-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
41-
Type 'keyof T' is not assignable to type 'keyof U'.
4237
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(87,5): error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
43-
Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
44-
Type 'keyof T' is not assignable to type 'keyof U'.
4538
tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(103,9): error TS2322: Type 'Extract<keyof T, string>' is not assignable to type 'K'.
4639
'Extract<keyof T, string>' is assignable to the constraint of type 'K', but 'K' could be instantiated with a different subtype of constraint 'string'.
4740
Type 'string & keyof T' is not assignable to type 'K'.
@@ -191,7 +184,6 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error
191184
setProperty(shape, cond ? "name" : "size", 10); // Error
192185
~~~~~~~~~~~~~~~~~~~~~~
193186
!!! error TS2345: Argument of type '"name" | "size"' is not assignable to parameter of type '"name" | "width" | "height" | "visible"'.
194-
!!! error TS2345: Type '"size"' is not assignable to type '"name" | "width" | "height" | "visible"'.
195187
}
196188

197189
function f20<T, U>(x: T | U, y: T & U, k1: keyof (T | U), k2: keyof T & keyof U, k3: keyof (T & U), k4: keyof T | keyof U) {
@@ -223,20 +215,14 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccessErrors.ts(142,5): error
223215
k1 = k4; // Error
224216
~~
225217
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
226-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
227-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'.
228218

229219
k2 = k1;
230220
k2 = k3; // Error
231221
~~
232222
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
233-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
234-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'.
235223
k2 = k4; // Error
236224
~~
237225
!!! error TS2322: Type 'keyof T | keyof U' is not assignable to type 'keyof T & keyof U'.
238-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof T & keyof U'.
239-
!!! error TS2322: Type 'keyof T' is not assignable to type 'keyof U'.
240226

241227
k3 = k1;
242228
k3 = k2;

tests/baselines/reference/objectSpreadStrictNull.errors.txt

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(14,9): error TS23
55
tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(15,9): error TS2322: Type '{ sn: number | undefined; }' is not assignable to type '{ sn: string | number; }'.
66
Types of property 'sn' are incompatible.
77
Type 'number | undefined' is not assignable to type 'string | number'.
8-
Type 'undefined' is not assignable to type 'string | number'.
98
tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(18,9): error TS2322: Type '{ sn: string | number | undefined; }' is not assignable to type '{ sn: string | number | boolean; }'.
109
Types of property 'sn' are incompatible.
1110
Type 'string | number | undefined' is not assignable to type 'string | number | boolean'.
@@ -42,7 +41,6 @@ tests/cases/conformance/types/spread/objectSpreadStrictNull.ts(42,5): error TS23
4241
!!! error TS2322: Type '{ sn: number | undefined; }' is not assignable to type '{ sn: string | number; }'.
4342
!!! error TS2322: Types of property 'sn' are incompatible.
4443
!!! error TS2322: Type 'number | undefined' is not assignable to type 'string | number'.
45-
!!! error TS2322: Type 'undefined' is not assignable to type 'string | number'.
4644
let allUndefined: { sn: string | number | undefined } = { ...undefinedString, ...undefinedNumber };
4745

4846
let undefinedWithOptionalContinues: { sn: string | number | boolean } = { ...definiteBoolean, ...undefinedString, ...optionalNumber };

tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt

-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2769:
55
Type 'void' is not assignable to type 'boolean'.
66
Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
77
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
8-
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
98
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2769: No overload matches this call.
109
Overload 1 of 2, '(props: Readonly<Props>): FieldFeedbackBeta<Props>', gave the following error.
1110
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
1211
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
1312
Type 'void' is not assignable to type 'boolean'.
1413
Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
1514
Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
16-
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
1715
tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769: No overload matches this call.
1816
Overload 1 of 2, '(props: Readonly<MyPropsProps>): FieldFeedback2<MyPropsProps>', gave the following error.
1917
Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
@@ -58,7 +56,6 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769:
5856
!!! error TS2769: Type 'void' is not assignable to type 'boolean'.
5957
!!! error TS2769: Overload 2 of 2, '(props: Props, context?: any): FieldFeedback<Props>', gave the following error.
6058
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
61-
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
6259
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
6360
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedback<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children" | "error"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when">> & Partial<Pick<{ when: () => boolean; }, never>>'
6461

@@ -85,7 +82,6 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2769:
8582
!!! error TS2769: Type 'void' is not assignable to type 'boolean'.
8683
!!! error TS2769: Overload 2 of 2, '(props: Props, context?: any): FieldFeedbackBeta<Props>', gave the following error.
8784
!!! error TS2769: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'.
88-
!!! error TS2769: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'.
8985
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedbackBeta<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when" | "error">> & Partial<Pick<BaseProps, never>>'
9086
!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<FieldFeedbackBeta<Props>> & Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "children"> & Partial<Pick<Readonly<{ children?: ReactNode; }> & Readonly<Props>, "when" | "error">> & Partial<Pick<BaseProps, never>>'
9187

0 commit comments

Comments
 (0)