-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Handling "undefined" #39
Comments
@snicol21 It's by design 😅 |
Thanks for responding @mesqueeb, this is the wrapper I ended up creating to accommodate this use case.
|
Related to this, if you try to apply a partial of the first type it causes problems because the resulting type gains const baseTokens: ColorTokensWithModes = {
uiBg: 'white',
uiBgAlternate: 'lightgray',
}
const tokens: ColorTokensWithModes = merge<ColorTokensWithModes, DeepPartial<ColorTokensWithModes>[]>(baseTokens, {
uiBg: colors.white,
}); |
Maybe this is by design, but I was surprised to learn that this:
Returns
undefined
. Is this expected, maybe it is, but I was kind of expecting it to return{}
. Am I right?I would hate to have to handle this scenario like this everytime:
The text was updated successfully, but these errors were encountered: