mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added _(...).delay defs
This commit is contained in:
@@ -546,6 +546,7 @@ result = <_.LoDashWrapper<number>>_(function() { console.log('deferred'); }).def
|
||||
|
||||
var log = _.bind(console.log, console);
|
||||
result = <number>_.delay(log, 1000, 'logged later');
|
||||
result = <_.LoDashWrapper<number>>_(log).delay(1000, 'logged later');
|
||||
|
||||
var fibonacci = <Function>_.memoize(function(n) {
|
||||
return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2);
|
||||
|
||||
Vendored
+9
@@ -2149,6 +2149,15 @@ declare module _ {
|
||||
wait: number,
|
||||
...args: any[]): number;
|
||||
|
||||
interface LoDashWrapper<T> {
|
||||
/**
|
||||
* @see _.delay
|
||||
**/
|
||||
delay(
|
||||
wait: number,
|
||||
...args: any[]): LoDashWrapper<number>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that memoizes the result of func. If resolver is provided it will be
|
||||
* used to determine the cache key for storing the result based on the arguments provided to
|
||||
|
||||
Reference in New Issue
Block a user