lodash: signatures of _.keysIn have been changed

This commit is contained in:
Ilya Mochalov
2015-11-21 20:30:33 +05:00
parent 16134c168d
commit f2841e5660
2 changed files with 37 additions and 5 deletions
+22 -2
View File
@@ -6302,8 +6302,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
@@ -10745,6 +10745,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.
*/
@@ -10769,17 +10771,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