-
-
Notifications
You must be signed in to change notification settings - Fork 621
Open
Labels
Description
Is your feature request related to a problem? Please describe.
I ran into quite some problems when trying to include blocknote in my codebase, where I have the typescript flag exactOptionalPropertyTypes
enabled. Just to name a few:
- https://stackblitz.com/edit/github-vlwsgjqe?file=tsconfig.json,src%2FApp.tsx
- https://stackblitz.com/edit/github-a6pyaljk?file=src%2FApp.tsx
Describe the solution you'd like
All code published as @blocknote/*
should be compiled with exactOptionalPropertyTypes
enabled to avoid both errors within the library, but also to compile in projects having this flag enabled.
Describe alternatives you've considered
- The project could be compiled without, but ensure that the exported types do work in repos with this rule enabled.
This option (while being quicker in the start) will cause quite some friction every time a type is changed and doesn't match the requirements ofexactOptionalPropertyTypes
. - I could disable the rule, but I would like keeping all the recommended rules enabled.
Additional context
-/-
Bonus
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖