diff --git a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt index e815b2a2ccb..5a09377844c 100644 --- a/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithDiscriminatedUnion.errors.txt @@ -1,13 +1,16 @@ assignmentCompatWithDiscriminatedUnion.ts(44,5): error TS2322: Type 'S' is not assignable to type 'T'. - Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 1; b: 2 | 4; }'. - Type 'S' is not assignable to type '{ a: 1; b: 2 | 4; }'. - Types of property 'a' are incompatible. - Type '0 | 2' is not assignable to type '1'. - Type '0' is not assignable to type '1'. + Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; }'. + Types of property 'a' are incompatible. + Type '0 | 2' is not assignable to type '0'. + Type '2' is not assignable to type '0'. assignmentCompatWithDiscriminatedUnion.ts(58,5): error TS2322: Type 'S' is not assignable to type 'T'. Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 2; b: 4 | 3; c: string; }'. Property 'c' is missing in type 'S' but required in type '{ a: 2; b: 4 | 3; c: string; }'. assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not assignable to type 'T'. + Type 'S' is not assignable to type '{ a: N; b: N; c: 2; }'. + Types of property 'c' are incompatible. + Type 'N' is not assignable to type '2'. + Type '0' is not assignable to type '2'. ==== assignmentCompatWithDiscriminatedUnion.ts (3 errors) ==== @@ -57,11 +60,10 @@ assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not a t = s; ~ !!! error TS2322: Type 'S' is not assignable to type 'T'. -!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; } | { a: 1; b: 2 | 4; }'. -!!! error TS2322: Type 'S' is not assignable to type '{ a: 1; b: 2 | 4; }'. -!!! error TS2322: Types of property 'a' are incompatible. -!!! error TS2322: Type '0 | 2' is not assignable to type '1'. -!!! error TS2322: Type '0' is not assignable to type '1'. +!!! error TS2322: Type 'S' is not assignable to type '{ a: 0; b: 4 | 1; }'. +!!! error TS2322: Types of property 'a' are incompatible. +!!! error TS2322: Type '0 | 2' is not assignable to type '0'. +!!! error TS2322: Type '2' is not assignable to type '0'. } // Unmatched non-discriminants @@ -107,6 +109,10 @@ assignmentCompatWithDiscriminatedUnion.ts(82,5): error TS2322: Type 'S' is not a t = s; ~ !!! error TS2322: Type 'S' is not assignable to type 'T'. +!!! error TS2322: Type 'S' is not assignable to type '{ a: N; b: N; c: 2; }'. +!!! error TS2322: Types of property 'c' are incompatible. +!!! error TS2322: Type 'N' is not assignable to type '2'. +!!! error TS2322: Type '0' is not assignable to type '2'. } // https://github.com/Microsoft/TypeScript/issues/14865