UNPKG

1.68 kBSource Map (JSON)View Raw
1{"version":3,"file":"curryRightAll.js","sourceRoot":"","sources":["src/curryRightAll.ts"],"names":[],"mappings":";;AAAA,8CAAiD;AAEjD,qCAAuF;AACvF,6CAAmD;AAEnD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,aAAa,GAAG,0BAAgB,CAAC,eAAe,CAC3D,IAAI,yBAAe,CAAC,UAAU,EAAE,IAAI,gCAAkB,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CACjD,CAAC;AACX,wBAHb,qBAAa,CAGa;AACvC,kBAAe,qBAAa,CAAC","sourcesContent":["import curryRight = require('lodash/curryRight');\n\nimport { DecoratorConfig, DecoratorFactory, BiTypedMethodDecorator1 } from './factory';\nimport { PreValueApplicator } from './applicators';\n\n/**\n * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight instead of _.partial.\n * The arity of func may be specified if func.length is not sufficient.\n * The original function is bound to the instance. If the method is needed to call in a different context use `CurryAll`.\n *\n * The _.curryRight.placeholder value, which defaults to _ in monolithic builds, may be used as a placeholder for provided arguments.\n *\n * Note: This method doesn't set the \"length\" property of curried functions.\n * @param {number} [arity] The arity of func.\n * @example\n *\n * class MyClass {\n * @CurryRightAll()\n * add(a, b) {\n * return (a + b);\n * }\n * }\n *\n * const myClass = new MyClass();\n *\n * const add5 = myClass.add(5);\n *\n * add5AndMultiply(10); // => 15\n */\nexport const CurryRightAll = DecoratorFactory.createDecorator(\n new DecoratorConfig(curryRight, new PreValueApplicator(), { optionalParams: true })\n) as BiTypedMethodDecorator1<number>;\nexport { CurryRightAll as curryRightAll };\nexport default CurryRightAll;\n"]}
\No newline at end of file