Skip to content

Instantly share code, notes, and snippets.

@gabemeola
Created February 1, 2019 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabemeola/e38f782639ba9f563a81b8337fbfd5e2 to your computer and use it in GitHub Desktop.
Save gabemeola/e38f782639ba9f563a81b8337fbfd5e2 to your computer and use it in GitHub Desktop.
Omits a key from a type
/**
* 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