You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It worked in v1.10 but in v2.1 it returns type error:
Argument of type '{ value: string; }' is not assignable to parameter of type 'Scalar<unknown>'.
Type '{ value: string; }' is missing the following properties from type 'Scalar<unknown>': toJSON, clone, [NODE_TYPE]
Thank you for reporting this! The argument's type was indeed a bit too strict. This wasn't caught by the tests for custom types, as they are (still) JS rather than TS.
I've also made the examples in the docs a little bit more robust.
Describe the bug
In the Writing Custom Tags there is an example:
It worked in v1.10 but in v2.1 it returns type error:
To Reproduce
Create custom tag with
Expected behaviour
No error.
Versions:
yaml
: yaml: 2.1.3The text was updated successfully, but these errors were encountered: