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

Make nullable keys optional in object type definitions #18

Merged
merged 1 commit into from
May 16, 2022
Merged

Make nullable keys optional in object type definitions #18

merged 1 commit into from
May 16, 2022

Conversation

anatelli10
Copy link
Contributor

Using a snippet from microsoft/TypeScript#12400 (comment) to make nullable keys optional in object type definitions. Nullable keys already support being optional, however the type was not reflecting this.

The down side to this is it adds more ugliness to the hover tooltips on the types. Most of the time it's just the additional OptionalNullable wrapper around the object, but sometimes it expands the Optional & Required types. Would take screenshots but can't figure out how to do it while hovering.

@wms wms merged commit 70bc9b5 into ai-labs-team:master May 16, 2022
@anatelli10 anatelli10 deleted the an-optional-keys branch May 16, 2022 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants