UNPKG

return-style

Version:

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

2 lines (1 loc) 140 B
export declare function getResultError<E = Error, T = unknown>(fn: () => T): [result: T, error: undefined] | [result: undefined, error: E];