UNPKG

tsoid

Version:

Typed functional library to deal with async operations.

8 lines (7 loc) 225 B
/** * Execution the action function if the condition was false. * * @param {boolean} cond * @param {function} fn */ export default function unless<A>(cond: boolean, fn: () => Promise<A>): Promise<A | Error | undefined>;