diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 85020b5df..fbef1d495 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -6434,16 +6434,27 @@ module TestTransform { } // _.values -class TestValues { - public a = 1; - public b = 2; - public c: string; +module TestValues { + let object: _.Dictionary; + + { + let result: TResult[]; + + result = _.values(object); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(object).values(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(object).chain().values(); + } } -TestValues.prototype.c = 'a'; -result = _.values(new TestValues()); -// → [1, 2] (iteration order is not guaranteed) -result = _(new TestValues()).values().value(); -// → [1, 2] (iteration order is not guaranteed) // _.valueIn class TestValueIn { diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index e1216dd47..91dadb85f 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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(object?: any): T[]; } interface LoDashImplicitObjectWrapper { /** - * @see _.values - **/ - values(): LoDashImplicitArrayWrapper; + * @see _.values + */ + values(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.values + */ + values(): LoDashExplicitArrayWrapper; } //_.valuesIn