Closed snk7891 closed 1 year ago
Hi @snk7891 Thanks for the heads up. We'll take a look on this one.
@snk7891 Hello, sir. When you have the time, please check our latest version. It should solve this issue. I'll close this one, but feel free to open another one if needed.
When using the
RichTextResolver
to customize the rendered HTML, theaddNode
method expects aISbSchema
as the second parameter, but it should accept a function instead.ISbSchema type definition for reference:
But when the field is accessed, a function is expected, as you can see here: https://github.com/storyblok/storyblok-js-client/blob/a436f209c1d63aff6198ee10afba1219028249bd/source/richTextResolver.js#L154-L159
Expected Behavior
We use the following code to create automatically some headings; typescript should not complain about the type definition of the second parameter of the
addNode
method:Current Behavior
Getting the following error:
Steps to Reproduce
You can copy the code above to have a type error