UNPKG

return-style

Version:

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

3 lines (2 loc) 153 B
import { Awaitable } from '@blackglory/prelude'; export declare function getErrorAsync<E = Error>(fn: () => Awaitable<unknown>): Promise<E | undefined>;