rubico
Version:
[a]synchronous functional programming
18 lines (17 loc) • 479 B
TypeScript
export = thunkConditional;
/**
* @name thunkConditional
*
* @synopsis
* ```coffeescript [specscript]
* thunkConditional<
* conditionalExpression boolean,
* thunkOnTruthy ()=>any,
* thunkOnFalsy ()=>any,
* >(conditionalExpression, thunkOnTruthy, thunkOnFalsy) -> any
* ```
*
* @description
* Like the conditional operator `a ? b : c` but for thunks.
*/
declare function thunkConditional(conditionalExpression: any, thunkOnTruthy: any, thunkOnFalsy: any): any;