Skip to content

Instantly share code, notes, and snippets.

@garronej
Created May 22, 2019 09:55
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 garronej/d51b7df2498f570ccace2d613ee2ebc7 to your computer and use it in GitHub Desktop.
Save garronej/d51b7df2498f570ccace2d613ee2ebc7 to your computer and use it in GitHub Desktop.
type Ret<T> = T extends (...args: any) => Promise<infer R> ? R : (T extends (...args: any) => infer R ? R : any);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment