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 PartialOnUndefinedDeep type #426
Conversation
Can you explain why you went with a different implementation than what's in https://stackoverflow.com/a/72320731/64949 ? Just curious how they compare and whether it was an intentional choice. |
Thanks for contributing. Make sure you read and adhere to: https://github.com/sindresorhus/type-fest/blob/main/.github/contributing.md#submitting-a-new-type |
You need to add the type to the readme. |
Hey,
This way, I finally implemented it from scratch as I would have done |
Create a type from another type with all keys and nested keys accepting undefined type set to optional. | ||
|
||
Use-cases: | ||
- Make all properties of a type that can be undefined optional to not have to specify keys with undefined value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you come up with some more use-cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure to have more use-cases that would be pertinent/understandable for users, let me know if something seems pertinent for you :)
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Thanks :) |
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
Closes #399