import { Func } from '../typings/types'; interface IfElse { (condition: Func, onTrue: Func, onFalse: Func): Func; (condition: Func, onTrue: Func): (onFalse: Func) => Func; (condition: Func): { (onTrue: Func, onFalse: Func): Func; (onTrue: Func): (onFalse: Func) => Func; }; } /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new unary function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @example * * const prop = ifElse( * x => x.a, * x => x.b, * x => x.c * ); * prop({ a: false, c: 2 }); //=> 2 * prop({ a: true, b: 1, c: 2 }); //=> 1 */ declare const _default: IfElse; export default _default;