UNPKG

1.03 kBTypeScriptView Raw
1import { BiTypedMethodDecorator1 } from './factory';
2/**
3 * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
4 * The arity of func may be specified if func.length is not sufficient.
5 * The original function is bound to the instance. If the method is needed to call in a different context use `CurryAll`.
6 *
7 * The _.curryRight.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for provided arguments.
8 *
9 * Note: This method doesn't set the "length" property of curried functions.
10 * @param {number} [arity] The arity of func.
11 * @example
12 *
13 * class MyClass {
14 * multiplier = 2;
15 *
16 * @CurryRight()
17 * add(a, b) {
18 * return (a + b) * this.multiplier;
19 * }
20 * }
21 *
22 * const myClass = new MyClass();
23 *
24 * const add5 = myClass.add(5);
25 *
26 * add5AndMultiply(10); // => 30
27 */
28export declare const CurryRight: BiTypedMethodDecorator1<number>;
29export { CurryRight as curryRight };
30export default CurryRight;