Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the flag exactOptionalPropertyTypes #796

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 22, 2022

The TypeScript flag exactOptionalPropertyTypes has been enabled, which causes TypeScript to distinguish between object properties that don't exist and properties that are set to undefined. This improves type safety for operations that iterate over keys.

The TypeScript flag `exactOptionalPropertyTypes` has been enabled,
which causes TypeScript to distinguish between object properties that
don't exist and properties that are set to `undefined`. This improves
type safety for operations that iterate over keys.
@Gudahtt
Copy link
Member Author

Gudahtt commented Apr 22, 2022

This is blocked by KeystoneHQ/ur-registry#21

@mcmire
Copy link
Contributor

mcmire commented Jul 28, 2023

Revisiting this PR. It would be nice to have this.

I'm wondering if there is a way we can get around the issue with ur-registry as I see exactOptionalPropertyTypes has not been enabled there yet. Perhaps we can define our own type definitions and get TypeScript to honor them rather than needing to honor ur-registry?

@mcmire mcmire mentioned this pull request Jul 31, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants