[Bug]: TextStyleOptions type error #3954
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Triage: Open
A new issue or pullrequest that requires triage (added by default)
Type: Bug
The issue or pullrequest is related to a bug
Which packages did you experience the bug in?
extension-text-style
What Tiptap version are you using?
2.0.2
What’s the bug you are facing?
https://tiptap.dev/examples/default
After converting the default example linked above to a .tsx file I got this typescript error:
I was able to get rid of the error in two ways so far:
1. Adding the 'types' property to the TextStyleOptions interface in the text-style.d.ts file
For reference, here is the color.d.ts file
2. Extending TextStyleOptions and then using the "as" keyword
...
I also looked at this page https://tiptap.dev/guide/typescript but I thought it might be for more custom extensions.
Should I stick with my #2 implementation, or should the types property get added directly to the TextStyleOptions type in the text-style.d.ts file?
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
This is only a typescript issue. It works fine in vanilla jsx.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: