diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 5bd99c06b2..f3dac0b006 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -17074,23 +17074,23 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairs(object?: T): any[][]; + toPairs(object?: T): [string, any][]; - toPairs(object?: T): TResult[][]; + toPairs(object?: T): [string, TResult][]; } interface LoDashImplicitObjectWrapper { /** * @see _.toPairs */ - toPairs(): LoDashImplicitArrayWrapper; + toPairs(): LoDashImplicitArrayWrapper<[string, TResult]>; } interface LoDashExplicitObjectWrapper { /** * @see _.toPairs */ - toPairs(): LoDashExplicitArrayWrapper; + toPairs(): LoDashExplicitArrayWrapper<[string, TResult]>; } //_.toPairsIn @@ -17101,23 +17101,23 @@ declare namespace _ { * @param object The object to query. * @return Returns the new array of key-value pairs. */ - toPairsIn(object?: T): any[][]; + toPairsIn(object?: T): [string, any][]; - toPairsIn(object?: T): TResult[][]; + toPairsIn(object?: T): [string, TResult][]; } interface LoDashImplicitObjectWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashImplicitArrayWrapper; + toPairsIn(): LoDashImplicitArrayWrapper<[string, TResult]>; } interface LoDashExplicitObjectWrapper { /** * @see _.toPairsIn */ - toPairsIn(): LoDashExplicitArrayWrapper; + toPairsIn(): LoDashExplicitArrayWrapper<[string, TResult]>; } //_.transform diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 5f90eb9063..470bb1338c 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -10174,37 +10174,37 @@ namespace TestToPairs { let object: _.Dictionary; { - let result: any[][]; + let result: [string, any][]; result = _.toPairs<_.Dictionary>(object); } { - let result: string[][]; + let result: [string, string][]; result = _.toPairs<_.Dictionary, string>(object); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, string]>; result = _(object).toPairs(); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, any]>; result = _(object).toPairs(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, string]>; result = _(object).chain().toPairs(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, any]>; result = _(object).chain().toPairs(); } @@ -10215,37 +10215,37 @@ namespace TestToPairsIn { let object: _.Dictionary; { - let result: any[][]; + let result: [string, any][]; result = _.toPairsIn<_.Dictionary>(object); } { - let result: string[][]; + let result: [string, string][]; result = _.toPairsIn<_.Dictionary, string>(object); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, string]>; result = _(object).toPairsIn(); } { - let result: _.LoDashImplicitArrayWrapper; + let result: _.LoDashImplicitArrayWrapper<[string, any]>; result = _(object).toPairsIn(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, string]>; result = _(object).chain().toPairsIn(); } { - let result: _.LoDashExplicitArrayWrapper; + let result: _.LoDashExplicitArrayWrapper<[string, any]>; result = _(object).chain().toPairs(); }