mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added _(...).curry def
This commit is contained in:
@@ -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