mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
lodash: signatures of _.valuesIn have been changed
This commit is contained in:
+21
-10
@@ -6729,17 +6729,28 @@ module TestValues {
|
||||
}
|
||||
}
|
||||
|
||||
// _.valueIn
|
||||
class TestValueIn {
|
||||
public a = 1;
|
||||
public b = 2;
|
||||
public c: number;
|
||||
// _.valuesIn
|
||||
module TestValuesIn {
|
||||
let object: _.Dictionary<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.valuesIn<TResult>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(object).valuesIn<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(object).chain().valuesIn<TResult>();
|
||||
}
|
||||
}
|
||||
TestValueIn.prototype.c = 3;
|
||||
result = <number[]>_.valuesIn<number>(new TestValueIn());
|
||||
// → [1, 2, 3]
|
||||
result = <number[]>_(new TestValueIn()).valuesIn<number>().value();
|
||||
// → [1, 2, 3]
|
||||
|
||||
/**********
|
||||
* String *
|
||||
|
||||
Vendored
+15
-7
@@ -11477,18 +11477,26 @@ declare module _ {
|
||||
//_.valuesIn
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array of the own and inherited enumerable property values of object.
|
||||
* @param object The object to query.
|
||||
* @return Returns the array of property values.
|
||||
**/
|
||||
* Creates an array of the own and inherited enumerable property values of object.
|
||||
*
|
||||
* @param object The object to query.
|
||||
* @return Returns the array of property values.
|
||||
*/
|
||||
valuesIn<T>(object?: any): T[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.valuesIn
|
||||
**/
|
||||
valuesIn<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
* @see _.valuesIn
|
||||
*/
|
||||
valuesIn<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.valuesIn
|
||||
*/
|
||||
valuesIn<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
/**********
|
||||
|
||||
Reference in New Issue
Block a user