mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of the method _.values have been changed
This commit is contained in:
+20
-9
@@ -6434,16 +6434,27 @@ module TestTransform {
|
||||
}
|
||||
|
||||
// _.values
|
||||
class TestValues {
|
||||
public a = 1;
|
||||
public b = 2;
|
||||
public c: string;
|
||||
module TestValues {
|
||||
let object: _.Dictionary<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.values<TResult>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(object).values<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(object).chain().values<TResult>();
|
||||
}
|
||||
}
|
||||
TestValues.prototype.c = 'a';
|
||||
result = <number[]>_.values<number>(new TestValues());
|
||||
// → [1, 2] (iteration order is not guaranteed)
|
||||
result = <number[]>_(new TestValues()).values<number>().value();
|
||||
// → [1, 2] (iteration order is not guaranteed)
|
||||
|
||||
// _.valueIn
|
||||
class TestValueIn {
|
||||
|
||||
Vendored
+15
-7
@@ -11271,18 +11271,26 @@ declare module _ {
|
||||
//_.values
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates an array of the own enumerable property values of object.
|
||||
* @param object The object to query.
|
||||
* @return Returns an array of property values.
|
||||
**/
|
||||
* Creates an array of the own enumerable property values of object.
|
||||
*
|
||||
* @param object The object to query.
|
||||
* @return Returns an array of property values.
|
||||
*/
|
||||
values<T>(object?: any): T[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.values
|
||||
**/
|
||||
values<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
* @see _.values
|
||||
*/
|
||||
values<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.values
|
||||
*/
|
||||
values<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.valuesIn
|
||||
|
||||
Reference in New Issue
Block a user