|
|
|
|
@@ -1,13 +1,11 @@
|
|
|
|
|
tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(4,1): error TS2322: Type '{ foo: { bar: number; }; }' is not assignable to type '{ foo: { bar: string; }; }'.
|
|
|
|
|
tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(4,1): error TS2322: Type '{ foo: { bar: number | undefined; }; }' is not assignable to type '{ foo: { bar: string | null; } | undefined; }'.
|
|
|
|
|
Types of property 'foo' are incompatible.
|
|
|
|
|
Type '{ bar: number; }' is not assignable to type '{ bar: string; }'.
|
|
|
|
|
Type '{ bar: number | undefined; }' is not assignable to type '{ bar: string | null; }'.
|
|
|
|
|
Types of property 'bar' are incompatible.
|
|
|
|
|
Type 'number' is not assignable to type 'string'.
|
|
|
|
|
tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(6,1): error TS2322: Type '{ foo: { bar: string; }; }' is not assignable to type '{ foo: { bar: number; }; }'.
|
|
|
|
|
Types of property 'foo' are incompatible.
|
|
|
|
|
Type '{ bar: string; }' is not assignable to type '{ bar: number; }'.
|
|
|
|
|
Types of property 'bar' are incompatible.
|
|
|
|
|
Type 'string' is not assignable to type 'number'.
|
|
|
|
|
Type 'number | undefined' is not assignable to type 'string | null'.
|
|
|
|
|
Type 'undefined' is not assignable to type 'string | null'.
|
|
|
|
|
tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(6,1): error TS2322: Type '{ foo: { bar: string | null; } | undefined; } | null | undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'.
|
|
|
|
|
Type 'undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
==== tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts (2 errors) ====
|
|
|
|
|
@@ -16,16 +14,15 @@ tests/cases/compiler/elaboratedErrorsOnNullableTargets01.ts(6,1): error TS2322:
|
|
|
|
|
|
|
|
|
|
x = y;
|
|
|
|
|
~
|
|
|
|
|
!!! error TS2322: Type '{ foo: { bar: number; }; }' is not assignable to type '{ foo: { bar: string; }; }'.
|
|
|
|
|
!!! error TS2322: Type '{ foo: { bar: number | undefined; }; }' is not assignable to type '{ foo: { bar: string | null; } | undefined; }'.
|
|
|
|
|
!!! error TS2322: Types of property 'foo' are incompatible.
|
|
|
|
|
!!! error TS2322: Type '{ bar: number; }' is not assignable to type '{ bar: string; }'.
|
|
|
|
|
!!! error TS2322: Type '{ bar: number | undefined; }' is not assignable to type '{ bar: string | null; }'.
|
|
|
|
|
!!! error TS2322: Types of property 'bar' are incompatible.
|
|
|
|
|
!!! error TS2322: Type 'number' is not assignable to type 'string'.
|
|
|
|
|
!!! error TS2322: Type 'number | undefined' is not assignable to type 'string | null'.
|
|
|
|
|
!!! error TS2322: Type 'undefined' is not assignable to type 'string | null'.
|
|
|
|
|
|
|
|
|
|
y = x;
|
|
|
|
|
~
|
|
|
|
|
!!! error TS2322: Type '{ foo: { bar: string; }; }' is not assignable to type '{ foo: { bar: number; }; }'.
|
|
|
|
|
!!! error TS2322: Types of property 'foo' are incompatible.
|
|
|
|
|
!!! error TS2322: Type '{ bar: string; }' is not assignable to type '{ bar: number; }'.
|
|
|
|
|
!!! error TS2322: Types of property 'bar' are incompatible.
|
|
|
|
|
!!! error TS2322: Type 'string' is not assignable to type 'number'.
|
|
|
|
|
!!! error TS2322: Type '{ foo: { bar: string | null; } | undefined; } | null | undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'.
|
|
|
|
|
!!! error TS2322: Type 'undefined' is not assignable to type '{ foo: { bar: number | undefined; }; }'.
|
|
|
|
|
|