Created
January 15, 2021 13:38
-
-
Save jasdeepkhalsa/c17696991e3aa3abe12495590362b071 to your computer and use it in GitHub Desktop.
Promise Any with TypeScript Generic Return Type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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