mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
2.8 KiB
Diff
30 lines
2.8 KiB
Diff
--- old.objectLiteralFunctionArgContextualTyping.errors.txt
|
|
+++ new.objectLiteralFunctionArgContextualTyping.errors.txt
|
|
@@= skipped -0, +0 lines =@@
|
|
objectLiteralFunctionArgContextualTyping.ts(8,6): error TS2353: Object literal may only specify known properties, and 'hello' does not exist in type 'I'.
|
|
objectLiteralFunctionArgContextualTyping.ts(10,17): error TS2353: Object literal may only specify known properties, and 'what' does not exist in type 'I'.
|
|
-objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'.
|
|
- Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
-objectLiteralFunctionArgContextualTyping.ts(12,4): error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'.
|
|
- Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
+objectLiteralFunctionArgContextualTyping.ts(11,4): error TS2741: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
+objectLiteralFunctionArgContextualTyping.ts(12,4): error TS2741: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
objectLiteralFunctionArgContextualTyping.ts(13,36): error TS2339: Property 'uhhh' does not exist on type 'string'.
|
|
|
|
|
|
@@= skipped -23, +21 lines =@@
|
|
!!! error TS2353: Object literal may only specify known properties, and 'what' does not exist in type 'I'.
|
|
f2({ toString: (s) => s }) // error, missing property value from ArgsString
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
-!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'.
|
|
-!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
+!!! error TS2741: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
!!! related TS2728 objectLiteralFunctionArgContextualTyping.ts:2:5: 'value' is declared here.
|
|
f2({ toString: (s: string) => s }) // error, missing property value from ArgsString
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
-!!! error TS2345: Argument of type '{ toString: (s: string) => string; }' is not assignable to parameter of type 'I'.
|
|
-!!! error TS2345: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
+!!! error TS2741: Property 'value' is missing in type '{ toString: (s: string) => string; }' but required in type 'I'.
|
|
!!! related TS2728 objectLiteralFunctionArgContextualTyping.ts:2:5: 'value' is declared here.
|
|
f2({ value: '', toString: (s) => s.uhhh }) // error
|
|
~~~~
|