Skip to content

Commit aa6ae66

Browse files
committed
Merge pull request DefinitelyTyped#6911 from chrootsu/lodash-valuesIn
lodash: signatures of _.valuesIn have been changed
2 parents 5e53d53 + 989cc74 commit aa6ae66

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
@@ -6800,17 +6800,28 @@ module TestValues {
68006800
}
68016801
}
68026802

6803-
// _.valueIn
6804-
class TestValueIn {
6805-
public a = 1;
6806-
public b = 2;
6807-
public c: number;
6808-
}
6809-
TestValueIn.prototype.c = 3;
6810-
result = <number[]>_.valuesIn<number>(new TestValueIn());
6811-
// → [1, 2, 3]
6812-
result = <number[]>_(new TestValueIn()).valuesIn<number>().value();
6813-
// → [1, 2, 3]
6803+
// _.valuesIn
6804+
module TestValuesIn {
6805+
let object: _.Dictionary<TResult>;
6806+
6807+
{
6808+
let result: TResult[];
6809+
6810+
result = _.valuesIn<TResult>(object);
6811+
}
6812+
6813+
{
6814+
let result: _.LoDashImplicitArrayWrapper<TResult>;
6815+
6816+
result = _(object).valuesIn<TResult>();
6817+
}
6818+
6819+
{
6820+
let result: _.LoDashExplicitArrayWrapper<TResult>;
6821+
6822+
result = _(object).chain().valuesIn<TResult>();
6823+
}
6824+
}
68146825

68156826
/**********
68166827
* String *

lodash/lodash.d.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11538,18 +11538,26 @@ declare module _ {
1153811538
//_.valuesIn
1153911539
interface LoDashStatic {
1154011540
/**
11541-
* Creates an array of the own and inherited enumerable property values of object.
11542-
* @param object The object to query.
11543-
* @return Returns the array of property values.
11544-
**/
11541+
* Creates an array of the own and inherited enumerable property values of object.
11542+
*
11543+
* @param object The object to query.
11544+
* @return Returns the array of property values.
11545+
*/
1154511546
valuesIn<T>(object?: any): T[];
1154611547
}
1154711548

1154811549
interface LoDashImplicitObjectWrapper<T> {
1154911550
/**
11550-
* @see _.valuesIn
11551-
**/
11552-
valuesIn<TResult>(): LoDashImplicitArrayWrapper<TResult>;
11551+
* @see _.valuesIn
11552+
*/
11553+
valuesIn<T>(): LoDashImplicitArrayWrapper<T>;
11554+
}
11555+
11556+
interface LoDashExplicitObjectWrapper<T> {
11557+
/**
11558+
* @see _.valuesIn
11559+
*/
11560+
valuesIn<T>(): LoDashExplicitArrayWrapper<T>;
1155311561
}
1155411562

1155511563
/**********

0 commit comments

Comments
 (0)