diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index ebd9e85dc..ebe254142 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -510,13 +510,13 @@ result = <_.LoDashWrapper<() => any>>_('name').createCallback(); result = <_.LoDashWrapper<() => boolean>>_(createCallbackObj).createCallback(); -var curried: Function = _.curry(function(a, b, c) { +result = _.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(a, b, c) { + console.log(a + b + c); +}).curry(); var lazyLayout: Function = _.debounce(function() {}, 150); jQuery(window).on('resize', lazyLayout); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index a3dcff5ce..5d5b1b50d 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2080,6 +2080,13 @@ declare module _ { func: Function, arity?: number): Function; + interface LoDashWrapper { + /** + * @see _.curry + **/ + curry(arity?: number): LoDashWrapper; + } + /** * 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