x/evt@v1.10.2/tools/typeSafety/AsyncReturnType.ts

šŸ’§EventEmitter's typesafe replacement
GitHub Stars
382
Go to Latest
AsyncReturnType.ts

/** Extract the return type of an async function */export type AsyncReturnType<T extends (...args: any) => Promise<any>> = T extends (...args: any) => Promise<infer R> ? R : never;