UNPKG

return-style

Version:

Non-intrusively convert the result of any function or promise to the user's desired style.

3 lines (2 loc) 140 B
import { Awaitable } from '@blackglory/prelude'; export declare function getResultAsync<T>(fn: () => Awaitable<T>): Promise<T | undefined>;