Skip to content

Instantly share code, notes, and snippets.

@jeromeludmann
Created November 25, 2020 00:47
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 jeromeludmann/531987cba0fe3c6c1b0f2220f41961b3 to your computer and use it in GitHub Desktop.
Save jeromeludmann/531987cba0fe3c6c1b0f2220f41961b3 to your computer and use it in GitHub Desktop.
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends
((k: infer I) => void) ? I
: never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment