Skip to content

Consider adoption of exactOptionalPropertyTypes ts-compiler option #2069

@SimonSimCity

Description

@SimonSimCity

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:

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

  1. 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 of exactOptionalPropertyTypes.
  2. 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 💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions