added _(...).curry def

This commit is contained in:
Brian Zengel
2013-10-21 00:47:30 -04:00
parent 65e0a6a400
commit ea6d2a70de
2 changed files with 11 additions and 4 deletions
+4 -4
View File
@@ -510,13 +510,13 @@ result = <_.LoDashWrapper<() => any>>_('name').createCallback();
result = <_.LoDashWrapper<() => boolean>>_(createCallbackObj).createCallback();
var curried: Function = _.curry(function(a, b, c) {
result = <Function>_.curry(function(a, b, c) {
console.log(a + b + c);
});
curried(1)(2)(3);
curried(1, 2)(3);
curried(1, 2, 3);
result = <_.LoDashWrapper<Function>>_(function(a, b, c) {
console.log(a + b + c);
}).curry();
var lazyLayout: Function = _.debounce(function() {}, 150);
jQuery(window).on('resize', lazyLayout);
+7
View File
@@ -2080,6 +2080,13 @@ declare module _ {
func: Function,
arity?: number): Function;
interface LoDashWrapper<T> {
/**
* @see _.curry
**/
curry(arity?: number): LoDashWrapper<Function>;
}
/**
* Creates a function that will delay the execution of func until after wait milliseconds have
* elapsed since the last time it was invoked. Provide an options object to indicate that func