Issue
I am trying to use jsymal.safeDump(somedata). I have run
npm install --save-dev @types/js-yaml
Also have my tsconfig
{
"compilerOptions": {
"types": [
"cypress",
"js-yaml"
]
},
}
But whenever I use jsyaml.safeDump it shows
Property 'safeDump' does not exist on type 'typeof import("/myPath/node_modules/@types/js-yaml/index")
It can be solved using @ts-ignore
But is there any other way I can use safeDump without ignoring typescript?
Solution
I think safeDump()
is deprecated from the js-yaml
version 4.x. To use safeDump()
with type seftey use the js-yaml
version 3.x with supported type module.
https://www.npmjs.com/package/js-yaml/v/3.14.1
Answered By - nur_riyad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.