mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
18 lines
1.3 KiB
Diff
18 lines
1.3 KiB
Diff
--- old.objectLiteralShorthandPropertiesFunctionArgument2.errors.txt
|
|
+++ new.objectLiteralShorthandPropertiesFunctionArgument2.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
-objectLiteralShorthandPropertiesFunctionArgument2.ts(7,5): error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'.
|
|
- Property 'a' is missing in type '{ name: string; id: number; }' but required in type '{ a: string; id: number; }'.
|
|
+objectLiteralShorthandPropertiesFunctionArgument2.ts(7,5): error TS2741: Property 'a' is missing in type '{ name: string; id: number; }' but required in type '{ a: string; id: number; }'.
|
|
|
|
|
|
==== objectLiteralShorthandPropertiesFunctionArgument2.ts (1 errors) ====
|
|
@@= skipped -10, +9 lines =@@
|
|
function foo(p: { a: string; id: number }) { }
|
|
foo(person); // error
|
|
~~~~~~
|
|
-!!! error TS2345: Argument of type '{ name: string; id: number; }' is not assignable to parameter of type '{ a: string; id: number; }'.
|
|
-!!! error TS2345: Property 'a' is missing in type '{ name: string; id: number; }' but required in type '{ a: string; id: number; }'.
|
|
+!!! error TS2741: Property 'a' is missing in type '{ name: string; id: number; }' but required in type '{ a: string; id: number; }'.
|
|
!!! related TS2728 objectLiteralShorthandPropertiesFunctionArgument2.ts:6:19: 'a' is declared here.
|
|
|