From 2d3b4eec2b1b75773c4e223a40d19192dc606fe2 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 21 Oct 2013 01:11:01 -0400 Subject: [PATCH] added _(...).defer defs --- lodash/lodash-tests.ts | 1 + lodash/lodash.d.ts | 7 +++++++ 2 files changed, 8 insertions(+) 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.