mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
37 lines
2.5 KiB
Diff
37 lines
2.5 KiB
Diff
--- old.noInfer.errors.txt
|
|
+++ new.noInfer.errors.txt
|
|
@@= skipped -3, +3 lines =@@
|
|
noInfer.ts(38,15): error TS2322: Type '"bar"' is not assignable to type '"foo"'.
|
|
noInfer.ts(39,15): error TS2322: Type '"bar"' is not assignable to type '"foo"'.
|
|
noInfer.ts(47,30): error TS2741: Property 'woof' is missing in type 'Animal' but required in type 'Dog'.
|
|
-noInfer.ts(53,16): error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type '{ x: number; y: number; }'.
|
|
- Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
|
|
+noInfer.ts(53,16): error TS2741: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
|
|
noInfer.ts(58,22): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.
|
|
noInfer.ts(59,14): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: number; }'.
|
|
-noInfer.ts(66,14): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ foo: number; }'.
|
|
- Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.
|
|
+noInfer.ts(66,14): error TS2741: Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.
|
|
|
|
|
|
==== noInfer.ts (10 errors) ====
|
|
@@= skipped -79, +77 lines =@@
|
|
const g = { x: 3, y: 2 };
|
|
assertEqual(g, { x: 3 }); // error
|
|
~~~~~~~~
|
|
-!!! error TS2345: Argument of type '{ x: number; }' is not assignable to parameter of type '{ x: number; y: number; }'.
|
|
-!!! error TS2345: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
|
|
+!!! error TS2741: Property 'y' is missing in type '{ x: number; }' but required in type '{ x: number; y: number; }'.
|
|
!!! related TS2728 noInfer.ts:52:19: 'y' is declared here.
|
|
|
|
declare function invoke<T, R>(func: (value: T) => R, value: NoInfer<T>): R;
|
|
@@= skipped -21, +20 lines =@@
|
|
doWork(comp, { foo: 42 }); // ok
|
|
doWork(comp, {}); // error
|
|
~~
|
|
-!!! error TS2345: Argument of type '{}' is not assignable to parameter of type '{ foo: number; }'.
|
|
-!!! error TS2345: Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.
|
|
+!!! error TS2741: Property 'foo' is missing in type '{}' but required in type '{ foo: number; }'.
|
|
!!! related TS2728 noInfer.ts:63:33: 'foo' is declared here.
|
|
|
|
declare function mutate<T>(callback: (a: NoInfer<T>, b: number) => T): T;
|