diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index dd07c61d1..ebd9e85dc 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -504,8 +504,11 @@ result = _.compose(greet, format); result = <_.LoDashWrapper>_(greet).compose(format); var createCallbackObj = { name: 'Joe' }; -var pluckCallback: () => any = _.createCallback('name'); -var whereCallback: () => boolean = _.createCallback(createCallbackObj); +result = <() => any>_.createCallback('name'); +result = <() => boolean>_.createCallback(createCallbackObj); +result = <_.LoDashWrapper<() => any>>_('name').createCallback(); +result = <_.LoDashWrapper<() => boolean>>_(createCallbackObj).createCallback(); + var curried: Function = _.curry(function(a, b, c) { console.log(a + b + c); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index a2be37ee3..a3dcff5ce 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2058,6 +2058,15 @@ declare module _ { thisArg?: any, argCount?: number): () => boolean; + interface LoDashWrapper { + /** + * @see _.createCallback + **/ + createCallback( + thisArg?: any, + argCount?: number): LoDashWrapper<() => any>; + } + /** * Creates a function which accepts one or more arguments of func that when invoked either * executes func returning its result, if all func arguments have been provided, or returns