mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Merge pull request #15363 from tamird/lodash-topairs
lodash: fix toPairs, toPairsIn definitions
This commit is contained in:
commit
b6dc00bc4f
16
types/lodash/index.d.ts
vendored
16
types/lodash/index.d.ts
vendored
@ -17074,23 +17074,23 @@ declare namespace _ {
|
||||
* @param object The object to query.
|
||||
* @return Returns the new array of key-value pairs.
|
||||
*/
|
||||
toPairs<T extends {}>(object?: T): any[][];
|
||||
toPairs<T extends {}>(object?: T): [string, any][];
|
||||
|
||||
toPairs<T extends {}, TResult>(object?: T): TResult[][];
|
||||
toPairs<T extends {}, TResult>(object?: T): [string, TResult][];
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.toPairs
|
||||
*/
|
||||
toPairs<TResult>(): LoDashImplicitArrayWrapper<TResult[]>;
|
||||
toPairs<TResult>(): LoDashImplicitArrayWrapper<[string, TResult]>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.toPairs
|
||||
*/
|
||||
toPairs<TResult>(): LoDashExplicitArrayWrapper<TResult[]>;
|
||||
toPairs<TResult>(): 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<T extends {}>(object?: T): any[][];
|
||||
toPairsIn<T extends {}>(object?: T): [string, any][];
|
||||
|
||||
toPairsIn<T extends {}, TResult>(object?: T): TResult[][];
|
||||
toPairsIn<T extends {}, TResult>(object?: T): [string, TResult][];
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.toPairsIn
|
||||
*/
|
||||
toPairsIn<TResult>(): LoDashImplicitArrayWrapper<TResult[]>;
|
||||
toPairsIn<TResult>(): LoDashImplicitArrayWrapper<[string, TResult]>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.toPairsIn
|
||||
*/
|
||||
toPairsIn<TResult>(): LoDashExplicitArrayWrapper<TResult[]>;
|
||||
toPairsIn<TResult>(): LoDashExplicitArrayWrapper<[string, TResult]>;
|
||||
}
|
||||
|
||||
//_.transform
|
||||
|
||||
@ -10174,37 +10174,37 @@ namespace TestToPairs {
|
||||
let object: _.Dictionary<string>;
|
||||
|
||||
{
|
||||
let result: any[][];
|
||||
let result: [string, any][];
|
||||
|
||||
result = _.toPairs<_.Dictionary<string>>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: string[][];
|
||||
let result: [string, string][];
|
||||
|
||||
result = _.toPairs<_.Dictionary<string>, string>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<string[]>;
|
||||
let result: _.LoDashImplicitArrayWrapper<[string, string]>;
|
||||
|
||||
result = _(object).toPairs<string>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<any[]>;
|
||||
let result: _.LoDashImplicitArrayWrapper<[string, any]>;
|
||||
|
||||
result = _(object).toPairs();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<string[]>;
|
||||
let result: _.LoDashExplicitArrayWrapper<[string, string]>;
|
||||
|
||||
result = _(object).chain().toPairs<string>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<any[]>;
|
||||
let result: _.LoDashExplicitArrayWrapper<[string, any]>;
|
||||
|
||||
result = _(object).chain().toPairs();
|
||||
}
|
||||
@ -10215,37 +10215,37 @@ namespace TestToPairsIn {
|
||||
let object: _.Dictionary<string>;
|
||||
|
||||
{
|
||||
let result: any[][];
|
||||
let result: [string, any][];
|
||||
|
||||
result = _.toPairsIn<_.Dictionary<string>>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: string[][];
|
||||
let result: [string, string][];
|
||||
|
||||
result = _.toPairsIn<_.Dictionary<string>, string>(object);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<string[]>;
|
||||
let result: _.LoDashImplicitArrayWrapper<[string, string]>;
|
||||
|
||||
result = _(object).toPairsIn<string>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<any[]>;
|
||||
let result: _.LoDashImplicitArrayWrapper<[string, any]>;
|
||||
|
||||
result = _(object).toPairsIn();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<string[]>;
|
||||
let result: _.LoDashExplicitArrayWrapper<[string, string]>;
|
||||
|
||||
result = _(object).chain().toPairsIn<string>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<any[]>;
|
||||
let result: _.LoDashExplicitArrayWrapper<[string, any]>;
|
||||
|
||||
result = _(object).chain().toPairs();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user