TypeScript Uzyskaj typ powrotu obietnicy
type AsyncReturnType<T extends (...args: any) => any> =
T extends (...args: any) => Promise<infer U> ? U :
T extends (...args: any) => infer U ? U :
any
florinrelea