Added definitions for _(...).forOwn, _(...).forOwnRight, fixed _(...).forIn, _(...).forInRight

This commit is contained in:
Brian Zengel
2013-11-10 19:25:29 -05:00
parent 7b56be3bc2
commit b8c64ce7ba
2 changed files with 30 additions and 4 deletions
+8
View File
@@ -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(_);
+22 -4
View File
@@ -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 {
/**