Use rehype-raw in react-markdown to parse HTML element the type is not match

Viewed 820

I'm using typescript in my react project, however when I use this code snippet I get an error

<ReactMarkdown rehypePlugins={[rehypeRaw]}>
   {content}
</ReactMarkdown>





Type '(options?: void | Options | undefined) => void | Transformer<Root, Root>' is not assignable to type 'Pluggable<any[], Settings>'.
  Type '(options?: void | Options | undefined) => void | Transformer<Root, Root>' is not assignable to type 'Plugin<any[], Settings>'.
    Type 'void | Transformer<Root, Root>' is not assignable to type 'void | Transformer'.
      Type 'Transformer<Root, Root>' is not assignable to type 'void | Transformer'.
        Type 'Transformer<Root, Root>' is not assignable to type 'Transformer'.
          Types of parameters 'node' and 'node' are incompatible.

any thoughts about that type error?

0 Answers
Related