Merge pull request #6911 from chrootsu/lodash-valuesIn

lodash: signatures of _.valuesIn have been changed
This commit is contained in:
Masahiro Wakame
2015-11-27 00:59:33 +09:00
2 changed files with 36 additions and 17 deletions
+21 -10
View File
@@ -6800,17 +6800,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
@@ -11538,18 +11538,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>;
}
/**********