-
-
Notifications
You must be signed in to change notification settings - Fork 533
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
Proposal: PartialRecord #231
Comments
Found the tsconfig option |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the scenario below
PartialRecord
is more typesafe thenRecord
:Record:
PartialRecord:
By using
PartialRecord
you are forced to handle the undefined case.You can technically achieve the same thing with
Partial<Record<string, User>>
. But remembering to wrapRecord
inPartial
feels cumbersome to me and is a bit of an eyesore. There is also the potential for a better shorter name.Upvote & Fund
The text was updated successfully, but these errors were encountered: