Created
July 27, 2023 06:11
-
-
Save mayognaise/61f4980f7b70690c1e5deb13df0f515f to your computer and use it in GitHub Desktop.
Define all keys as optional
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When all keys are optional | |
type User = Partial<{ | |
name: string | |
email: string | |
phone: string | |
}> | |
/** | |
type User = { | |
name?: string | undefined; | |
email?: string | undefined; | |
phone?: string | undefined; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment