-
-
Notifications
You must be signed in to change notification settings - Fork 502
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
Add SetNonNullable
type
#228
Comments
looking forward to this to be included 👍 |
@sindresorhus do you think this type needs to deal with optionality? We have the following type in our codebase at work: type SetNonNullable<
BaseType,
KeysToSet extends keyof BaseType = keyof BaseType
> = {
[Key in keyof BaseType]: Key extends KeysToSet
? NonNullable<BaseType[Key]>
: BaseType[Key];
}; So I'm wondering if we'd all be happier with the naming of this if it more closely followed the behaviour of |
@joealden It should work like |
I believe this can be closed now that #431 has been merged? |
yeah this can be closed I guess |
#199
Upvote & Fund
The text was updated successfully, but these errors were encountered: