mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-09 11:40:07 +00:00
added _(...).defer defs
This commit is contained in:
@@ -542,6 +542,7 @@ source.addEventListener('message', <_.LoDashWrapper<Function>>_(function() {}).d
|
||||
}), false);
|
||||
|
||||
result = <number>_.defer(function() { console.log('deferred'); });
|
||||
result = <_.LoDashWrapper<number>>_(function() { console.log('deferred'); }).defer();
|
||||
|
||||
var log = _.bind(console.log, console);
|
||||
result = <number>_.delay(log, 1000, 'logged later');
|
||||
|
||||
7
lodash/lodash.d.ts
vendored
7
lodash/lodash.d.ts
vendored
@@ -2129,6 +2129,13 @@ declare module _ {
|
||||
func: Function,
|
||||
...args: any[]): number;
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see
|
||||
**/
|
||||
defer(...args: any[]): LoDashWrapper<number>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the func function after wait milliseconds. Additional arguments will be provided
|
||||
* to func when it is invoked.
|
||||
|
||||
Reference in New Issue
Block a user