Files

19 lines
1.2 KiB
Diff

--- old.nonPrimitiveAssignError.errors.txt
+++ new.nonPrimitiveAssignError.errors.txt
@@= skipped -0, +0 lines =@@
-nonPrimitiveAssignError.ts(5,1): error TS2741: Property 'foo' is missing in type '{}' but required in type '{ foo: string; }'.
+nonPrimitiveAssignError.ts(5,1): error TS2322: Type 'object' is not assignable to type '{ foo: string; }'.
+ Property 'foo' is missing in type '{}' but required in type '{ foo: string; }'.
nonPrimitiveAssignError.ts(13,1): error TS2322: Type 'number' is not assignable to type 'object'.
nonPrimitiveAssignError.ts(14,1): error TS2322: Type 'boolean' is not assignable to type 'object'.
nonPrimitiveAssignError.ts(15,1): error TS2322: Type 'string' is not assignable to type 'object'.
@@= skipped -13, +14 lines =@@
x = a;
y = a; // expect error
~
-!!! error TS2741: Property 'foo' is missing in type '{}' but required in type '{ foo: string; }'.
+!!! error TS2322: Type 'object' is not assignable to type '{ foo: string; }'.
+!!! error TS2322: Property 'foo' is missing in type '{}' but required in type '{ foo: string; }'.
!!! related TS2728 nonPrimitiveAssignError.ts:2:10: 'foo' is declared here.
a = x;
a = y;