Skip to content

Commit 989cc74

Browse files
committed
lodash: signatures of _.valuesIn have been changed
1 parent ba424f7 commit 989cc74

File tree

2 files changed

+37
-18
lines changed

2 files changed

+37
-18
lines changed

lodash/lodash-tests.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6729,17 +6729,28 @@ module TestValues {
67296729
}
67306730
}
67316731

6732-
// _.valueIn
6733-
class TestValueIn {
6734-
public a = 1;
6735-
public b = 2;
6736-
public c: number;
6737-
}
6738-
TestValueIn.prototype.c = 3;
6739-
result = <number[]>_.valuesIn<number>(new TestValueIn());
6740-
// → [1, 2, 3]
6741-
result = <number[]>_(new TestValueIn()).valuesIn<number>().value();
6742-
// → [1, 2, 3]
6732+
// _.valuesIn
6733+
module TestValuesIn {
6734+
let object: _.Dictionary<TResult>;
6735+
6736+
{
6737+
let result: TResult[];
6738+
6739+
result = _.valuesIn<TResult>(object);
6740+
}
6741+
6742+
{
6743+
let result: _.LoDashImplicitArrayWrapper<TResult>;
6744+
6745+
result = _(object).valuesIn<TResult>();
6746+
}
6747+
6748+
{
6749+
let result: _.LoDashExplicitArrayWrapper<TResult>;
6750+
6751+
result = _(object).chain().valuesIn<TResult>();
6752+
}
6753+
}
67436754

67446755
/**********
67456756
* String *

lodash/lodash.d.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11477,18 +11477,26 @@ declare module _ {
1147711477
//_.valuesIn
1147811478
interface LoDashStatic {
1147911479
/**
11480-
* Creates an array of the own and inherited enumerable property values of object.
11481-
* @param object The object to query.
11482-
* @return Returns the array of property values.
11483-
**/
11480+
* Creates an array of the own and inherited enumerable property values of object.
11481+
*
11482+
* @param object The object to query.
11483+
* @return Returns the array of property values.
11484+
*/
1148411485
valuesIn<T>(object?: any): T[];
1148511486
}
1148611487

1148711488
interface LoDashImplicitObjectWrapper<T> {
1148811489
/**
11489-
* @see _.valuesIn
11490-
**/
11491-
valuesIn<TResult>(): LoDashImplicitArrayWrapper<TResult>;
11490+
* @see _.valuesIn
11491+
*/
11492+
valuesIn<T>(): LoDashImplicitArrayWrapper<T>;
11493+
}
11494+
11495+
interface LoDashExplicitObjectWrapper<T> {
11496+
/**
11497+
* @see _.valuesIn
11498+
*/
11499+
valuesIn<T>(): LoDashExplicitArrayWrapper<T>;
1149211500
}
1149311501

1149411502
/**********

0 commit comments

Comments
 (0)