lodash: signatures of _.valuesIn have been changed

This commit is contained in:
Ilya Mochalov
2015-11-24 05:07:52 +05:00
parent ba424f7ee3
commit 989cc747fd
2 changed files with 36 additions and 17 deletions
+21 -10
View File
@@ -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 *
+15 -7
View File
@@ -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>;
}
/**********