mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
1.8 KiB
Diff
19 lines
1.8 KiB
Diff
--- old.assignmentCompatFunctionsWithOptionalArgs.errors.txt
|
|
+++ new.assignmentCompatFunctionsWithOptionalArgs.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
assignmentCompatFunctionsWithOptionalArgs.ts(1,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
|
assignmentCompatFunctionsWithOptionalArgs.ts(4,17): error TS2322: Type 'boolean' is not assignable to type 'string'.
|
|
-assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string | undefined; }'.
|
|
- Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string | undefined; }'.
|
|
+assignmentCompatFunctionsWithOptionalArgs.ts(5,5): error TS2741: Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string | undefined; }'.
|
|
|
|
|
|
==== assignmentCompatFunctionsWithOptionalArgs.ts (3 errors) ====
|
|
@@= skipped -15, +14 lines =@@
|
|
!!! related TS6500 assignmentCompatFunctionsWithOptionalArgs.ts:1:31: The expected type comes from property 'name' which is declared here on type '{ id: number; name?: string | undefined; }'
|
|
foo({ name: "hello" }); // Error, id required but missing
|
|
~~~~~~~~~~~~~~~~~
|
|
-!!! error TS2345: Argument of type '{ name: string; }' is not assignable to parameter of type '{ id: number; name?: string | undefined; }'.
|
|
-!!! error TS2345: Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string | undefined; }'.
|
|
+!!! error TS2741: Property 'id' is missing in type '{ name: string; }' but required in type '{ id: number; name?: string | undefined; }'.
|
|
!!! related TS2728 assignmentCompatFunctionsWithOptionalArgs.ts:1:19: 'id' is declared here.
|