Created
February 1, 2019 21:39
-
-
Save gabemeola/e38f782639ba9f563a81b8337fbfd5e2 to your computer and use it in GitHub Desktop.
Omits a key from a type
This file contains hidden or 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
/** | |
* Omit a value from a type | |
*/ | |
export type Omit<Type, Key extends keyof Type> = Pick<Type, Exclude<keyof Type, Key>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment