Merge pull request #6876 from chrootsu/lodash-keysIn

lodash: signatures of _.keysIn have been changed
This commit is contained in:
Masahiro Wakame
2015-11-27 00:01:16 +09:00
2 changed files with 37 additions and 5 deletions
+22 -2
View File
@@ -6377,8 +6377,28 @@ module TestKeys {
}
}
result = <string[]>_.keysIn({ 'one': 1, 'two': 2, 'three': 3 });
result = <string[]>_({ 'one': 1, 'two': 2, 'three': 3 }).keysIn().value();
// _.keysIn
module TestKeysIn {
let object: _.Dictionary<any>;
{
let result: string[];
result = _.keysIn(object);
}
{
let result: _.LoDashImplicitArrayWrapper<string>;
result = _(object).keysIn();
}
{
let result: _.LoDashExplicitArrayWrapper<string>;
result = _(object).chain().keysIn();
}
}
// _.mapKeys
module TestMapKeys {
+15 -3
View File
@@ -10783,6 +10783,8 @@ declare module _ {
/**
* Creates an array of the own enumerable property names of object.
*
* Note: Non-object values are coerced to objects. See the ES spec for more details.
*
* @param object The object to query.
* @return Returns the array of property names.
*/
@@ -10807,17 +10809,27 @@ declare module _ {
interface LoDashStatic {
/**
* Creates an array of the own and inherited enumerable property names of object.
*
* Note: Non-object values are coerced to objects.
*
* @param object The object to query.
* @return An array of property names.
**/
*/
keysIn(object?: any): string[];
}
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.keysIn
**/
keysIn(): LoDashImplicitArrayWrapper<string>
*/
keysIn(): LoDashImplicitArrayWrapper<string>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.keysIn
*/
keysIn(): LoDashExplicitArrayWrapper<string>;
}
//_.mapKeys