mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6549 from chrootsu/lodash-intersection
lodash: signatures of the method _.intersection changed
This commit is contained in:
+30
-10
@@ -610,16 +610,36 @@ module TestIndexOf {
|
||||
}
|
||||
|
||||
// _.intersection
|
||||
{
|
||||
let testIntersectionArray: TResult[];
|
||||
let testIntersectionList: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
result = _.intersection<TResult>(testIntersectionArray, testIntersectionList);
|
||||
result = _.intersection<TResult>(testIntersectionList, testIntersectionArray, testIntersectionList);
|
||||
result = _(testIntersectionArray).intersection<TResult>(testIntersectionArray).value();
|
||||
result = _(testIntersectionArray).intersection<TResult>(testIntersectionList, testIntersectionArray).value();
|
||||
result = _(testIntersectionList).intersection<TResult>(testIntersectionArray).value();
|
||||
result = _(testIntersectionList).intersection<TResult>(testIntersectionList, testIntersectionArray).value();
|
||||
module TestIntersection {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.intersection<TResult>(array, list);
|
||||
result = _.intersection<TResult>(list, array, list);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).intersection<TResult>(array);
|
||||
result = _(array).intersection<TResult>(list, array);
|
||||
|
||||
result = _(list).intersection<TResult>(array);
|
||||
result = _(list).intersection<TResult>(list, array);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().intersection<TResult>(array);
|
||||
result = _(array).chain().intersection<TResult>(list, array);
|
||||
|
||||
result = _(list).chain().intersection<TResult>(array);
|
||||
result = _(list).chain().intersection<TResult>(list, array);
|
||||
}
|
||||
}
|
||||
|
||||
// _.last
|
||||
|
||||
Vendored
+14
@@ -1145,6 +1145,20 @@ declare module _ {
|
||||
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashImplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.intersection
|
||||
*/
|
||||
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.intersection
|
||||
*/
|
||||
intersection<TResult>(...arrays: (TResult[]|List<TResult>)[]): LoDashExplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.last
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user