mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
Merge pull request #6914 from chrootsu/lodash-at
lodash: signatures of _.at have been changed
This commit is contained in:
commit
87d9fa607f
@ -2557,17 +2557,34 @@ module TestAny {
|
||||
}
|
||||
|
||||
// _.at
|
||||
{
|
||||
let testAtArray: TResult[];
|
||||
let testAtList: _.List<TResult>;
|
||||
let testAtDictionary: _.Dictionary<TResult>;
|
||||
let result: TResult[];
|
||||
result = _.at<TResult>(testAtArray, 0, '1', [2], ['3'], [4, '5']);
|
||||
result = _.at<TResult>(testAtList, 0, '1', [2], ['3'], [4, '5']);
|
||||
result = _.at<TResult>(testAtDictionary, 0, '1', [2], ['3'], [4, '5']);
|
||||
result = _(testAtArray).at(0, '1', [2], ['3'], [4, '5']).value();
|
||||
result = _(testAtList).at<TResult>(0, '1', [2], ['3'], [4, '5']).value();
|
||||
result = _(testAtDictionary).at<TResult>(0, '1', [2], ['3'], [4, '5']).value();
|
||||
module TestAt {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let dictionary: _.Dictionary<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.at<TResult>(array, 0, '1', [2], ['3'], [4, '5']);
|
||||
result = _.at<TResult>(list, 0, '1', [2], ['3'], [4, '5']);
|
||||
result = _.at<TResult>(dictionary, 0, '1', [2], ['3'], [4, '5']);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).at(0, '1', [2], ['3'], [4, '5']);
|
||||
result = _(list).at<TResult>(0, '1', [2], ['3'], [4, '5']);
|
||||
result = _(dictionary).at<TResult>(0, '1', [2], ['3'], [4, '5']);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().at(0, '1', [2], ['3'], [4, '5']);
|
||||
result = _(list).chain().at<TResult>(0, '1', [2], ['3'], [4, '5']);
|
||||
result = _(dictionary).chain().at<TResult>(0, '1', [2], ['3'], [4, '5']);
|
||||
}
|
||||
}
|
||||
|
||||
// _.collect
|
||||
|
||||
20
lodash/lodash.d.ts
vendored
20
lodash/lodash.d.ts
vendored
@ -3793,7 +3793,7 @@ declare module _ {
|
||||
*/
|
||||
at<T>(
|
||||
collection: List<T>|Dictionary<T>,
|
||||
...props: Array<number|string|Array<number|string>>
|
||||
...props: (number|string|(number|string)[])[]
|
||||
): T[];
|
||||
}
|
||||
|
||||
@ -3801,14 +3801,28 @@ declare module _ {
|
||||
/**
|
||||
* @see _.at
|
||||
*/
|
||||
at(...props: Array<number|string|Array<number|string>>): LoDashImplicitArrayWrapper<T>;
|
||||
at(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.at
|
||||
*/
|
||||
at<TResult>(...props: Array<number|string|Array<number|string>>): LoDashImplicitArrayWrapper<TResult>;
|
||||
at<T>(...props: (number|string|(number|string)[])[]): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.at
|
||||
*/
|
||||
at(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.at
|
||||
*/
|
||||
at<T>(...props: (number|string|(number|string)[])[]): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.collect
|
||||
|
||||
Loading…
Reference in New Issue
Block a user