Skip to main content

AsyncFnReturn

비동기 함수의 반환값 타입을 추출합니다.

Signature

type AsyncFnReturn<T extends AsyncFn> = Awaited<ReturnType<T>>;

References

AsyncFn

Example

type Example = AsyncFnReturn<() => Promise<number>>;
// type Example = number