mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6876 from chrootsu/lodash-keysIn
lodash: signatures of _.keysIn have been changed
This commit is contained in:
+22
-2
@@ -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 {
|
||||
|
||||
Vendored
+15
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user