-
Notifications
You must be signed in to change notification settings - Fork 151
Closed
Description
Hey! 👋
I have an typescript error passing Prism as a prop to Highlight. This happens on both Prism imported from prismjs and the exported Prism from prism-react-renderer
Error:
Type 'typeof import("./node_modules/@types/prismjs/index")' is not assignable to type 'PrismLib'.
Types of property 'languages' are incompatible.
Type 'Languages' is not assignable to type 'LanguagesDict'.
'string' index signatures are incompatible.
Type 'Grammar' is not assignable to type 'PrismGrammar'.
Type 'GrammarRest' is not assignable to type 'PrismGrammar'.
Index signature for type 'string' is missing in type 'GrammarRest'.ts(2322)
Reproducible sandbox:
https://codesandbox.io/s/sweet-fire-jmfge6?file=/src/App.tsx
Please let me know if you need more info, or if I have missed something :)
carloskelly13
Metadata
Metadata
Assignees
Labels
No labels
