mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Added definitions for _(...).forOwn, _(...).forOwnRight, fixed _(...).forIn, _(...).forInRight
This commit is contained in:
@@ -693,10 +693,18 @@ result = <any>_.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, k
|
||||
console.log(key);
|
||||
});
|
||||
|
||||
result = <_.LoDashObjectWrapper<any>>_({ '0': 'zero', '1': 'one', 'length': 2 }).forOwn(function(num, key) {
|
||||
console.log(key);
|
||||
});
|
||||
|
||||
result = <any>_.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
console.log(key);
|
||||
});
|
||||
|
||||
result = <_.LoDashObjectWrapper<any>>_({ '0': 'zero', '1': 'one', 'length': 2 }).forOwnRight(function(num, key) {
|
||||
console.log(key);
|
||||
});
|
||||
|
||||
result = <string[]>_.functions(_);
|
||||
result = <string[]>_.methods(_);
|
||||
|
||||
|
||||
Vendored
+22
-4
@@ -3251,8 +3251,8 @@ declare module _ {
|
||||
* @see _.forIn
|
||||
**/
|
||||
forIn<T extends {}>(
|
||||
callback?: ObjectIterator<T, void>,
|
||||
thisArg?: any): Dictionary<T>;
|
||||
callback: ObjectIterator<T, void>,
|
||||
thisArg?: any): _.LoDashObjectWrapper<T>;
|
||||
}
|
||||
|
||||
//_.forInRight
|
||||
@@ -3276,8 +3276,8 @@ declare module _ {
|
||||
* @see _.forInRight
|
||||
**/
|
||||
forInRight<T extends {}>(
|
||||
callback?: ObjectIterator<T, void>,
|
||||
thisArg?: any): Dictionary<T>;
|
||||
callback: ObjectIterator<T, void>,
|
||||
thisArg?: any): _.LoDashObjectWrapper<T>;
|
||||
}
|
||||
|
||||
//_.forOwn
|
||||
@@ -3297,6 +3297,15 @@ declare module _ {
|
||||
thisArg?: any): Dictionary<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper {
|
||||
/**
|
||||
* @see _.forOwn
|
||||
**/
|
||||
forOwn<T extends {}>(
|
||||
callback: ObjectIterator<T, void>,
|
||||
thisArg?: any): _.LoDashObjectWrapper<T>;
|
||||
}
|
||||
|
||||
//_.forOwnRight
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
@@ -3313,6 +3322,15 @@ declare module _ {
|
||||
thisArg?: any): Dictionary<T>;
|
||||
}
|
||||
|
||||
interface LoDashObjectWrapper {
|
||||
/**
|
||||
* @see _.forOwnRight
|
||||
**/
|
||||
forOwnRight<T extends {}>(
|
||||
callback: ObjectIterator<T, void>,
|
||||
thisArg?: any): _.LoDashObjectWrapper<T>;
|
||||
}
|
||||
|
||||
//_.functions
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user