Skip to content

Consider adoption of exactOptionalPropertyTypes ts-compiler option #2069

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 💖

Activity

  1. nperez0111 commented on Oct 6, 2025

    @nperez0111
    Contributor

    Another alternative here would be to not be type-checking library code (which is bad practice & slower).

    It would take us a long time to refactor types to exactOptionalPropertyTypes, for very little benefit, so I don't see us taking this on for a while.

  2. added theissue type on Oct 6, 2025
  3. SimonSimCity commented on Oct 6, 2025

    @SimonSimCity
    Author

    Another alternative here would be to not be type-checking library code (which is bad practice & slower).

    Do you hereby mean to enable skipLibCheck? This has already been switched on in the stackblitz-demos, but I still get type-errors.

  4. added
    needs-triageIssue has not yet been reviewed or classified by maintainers.
    on Feb 3, 2026
  5. locked and limited conversation to collaborators on Feb 19, 2026
  6. converted this issue into a discussion #2476 on Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue has not yet been reviewed or classified by maintainers.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions