1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var curryRight = require("lodash/curryRight");
|
4 | var factory_1 = require("./factory");
|
5 | var applicators_1 = require("./applicators");
|
6 | /**
|
7 | * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.
|
8 | * The arity of func may be specified if func.length is not sufficient.
|
9 | * The original function is bound to the instance. If the method is needed to call in a different context use `CurryAll`.
|
10 | *
|
11 | * The _.curryRight.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for provided arguments.
|
12 | *
|
13 | * Note: This method doesn't set the "length" property of curried functions.
|
14 | * @param {number} [arity] The arity of func.
|
15 | * @example
|
16 | *
|
17 | * class MyClass {
|
18 | * @CurryRightAll()
|
19 | * add(a, b) {
|
20 | * return (a + b);
|
21 | * }
|
22 | * }
|
23 | *
|
24 | * const myClass = new MyClass();
|
25 | *
|
26 | * const add5 = myClass.add(5);
|
27 | *
|
28 | * add5AndMultiply(10); // => 15
|
29 | */
|
30 | exports.CurryRightAll = factory_1.DecoratorFactory.createDecorator(new factory_1.DecoratorConfig(curryRight, new applicators_1.PreValueApplicator(), { optionalParams: true }));
|
31 | exports.curryRightAll = exports.CurryRightAll;
|
32 | exports.default = exports.CurryRightAll;
|
33 | //# sourceMappingURL=curryRightAll.js.map |
\ | No newline at end of file |