Skip to content

Instantly share code, notes, and snippets.

@rchl
Created April 24, 2023 22:09
Show Gist options
  • Save rchl/9ca0a2bdc95f2c36c4d590572a4d038c to your computer and use it in GitHub Desktop.
Save rchl/9ca0a2bdc95f2c36c4d590572a4d038c to your computer and use it in GitHub Desktop.
TypeScript Helpers
// Forces typescript to expand the type in the hover output. Useful for debugging.
type Prettify<T> = T extends infer U ? { [K in keyof U]: U[K] } : never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment