diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index b282c4991a..86e5053efd 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -542,6 +542,7 @@ source.addEventListener('message', <_.LoDashWrapper>_(function() {}).d }), false); result = _.defer(function() { console.log('deferred'); }); +result = <_.LoDashWrapper>_(function() { console.log('deferred'); }).defer(); var log = _.bind(console.log, console); result = _.delay(log, 1000, 'logged later'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 2e085cc29c..bfbdd22bfe 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -2129,6 +2129,13 @@ declare module _ { func: Function, ...args: any[]): number; + interface LoDashWrapper { + /** + * @see + **/ + defer(...args: any[]): LoDashWrapper; + } + /** * Executes the func function after wait milliseconds. Additional arguments will be provided * to func when it is invoked.