type-fest
type-fest copied to clipboard
`PartialOnUndefined` with only 1 level deep
There is PartialOnUndefinedDeep
:
- https://github.com/sindresorhus/type-fest/issues/399
- https://github.com/sindresorhus/type-fest/pull/426
But how can I make it work with only 1 level deep? 🤔
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
// @Emiyaaaaa
But how can I make it work with only 1 level deep? 🤔
What's your case? I can't seem to reproduce that.
+1 to @yvele. It’d be cool to have PartialOnUndefined
and UndefinedOnPartial
in addition to PartialOnUndefinedDeep
and UndefinedOnPartialDeep
. These would be more performant and can be used when type mismatch exists only on one level of depth. Happy to try a PR if these two types can be accepted in theory.
+1 to @yvele. It’d be cool to have
PartialOnUndefined
andUndefinedOnPartial
in addition toPartialOnUndefinedDeep
andUndefinedOnPartialDeep
. These would be more performant and can be used when type mismatch exists only on one level of depth. Happy to try a PR if these two types can be accepted in theory.
Sure, go it.