mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
added _(...).curry def
This commit is contained in:
1 parent
65e0a6a400
commit
ea6d2a70de
2 files changed
+11
-4
No files matched your search
@@ -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);
|
||||
|
||||
Vendored
+7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user