Skip to content

Instantly share code, notes, and snippets.

@Jtosbornex
Created January 12, 2021 21:24
Show Gist options
  • Save Jtosbornex/6ae2971fb08832da39f93063670ce539 to your computer and use it in GitHub Desktop.
Save Jtosbornex/6ae2971fb08832da39f93063670ce539 to your computer and use it in GitHub Desktop.
Typescript resolve promise utility type
export type Unpromise<T extends Promise<any>> = T extends Promise<infer U> ? U : never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment