Merge pull request #6787 from chrootsu/lodash-values

lodash: signatures of the method _.values have been changed
This commit is contained in:
Masahiro Wakame
2015-11-19 23:22:32 +09:00
2 changed files with 35 additions and 16 deletions
+20 -9
View File
@@ -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 {
+15 -7
View File
@@ -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