Skip to content

Instantly share code, notes, and snippets.

@jasdeepkhalsa
Created January 15, 2021 13:38
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 jasdeepkhalsa/c17696991e3aa3abe12495590362b071 to your computer and use it in GitHub Desktop.
Save jasdeepkhalsa/c17696991e3aa3abe12495590362b071 to your computer and use it in GitHub Desktop.
Promise Any with TypeScript Generic Return Type
type PromiseAny<T = any> = Promise<T>;
interface IClass {
methodA: (
paramA?: string,
) => PromiseAny | void;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment