UNPKG

return-style

Version:

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

3 lines (2 loc) 202 B
import { Awaitable } from '@blackglory/prelude'; export declare function getFailureAsync<E = Error>(fn: () => Awaitable<unknown>): Promise<[failed: true, error: E] | [failed: false, error: undefined]>;