mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-30 11:14:27 +08:00
Merge pull request #6729 from chrootsu/lodash-without
lodash: signatures of the method _.without have been changed
This commit is contained in:
+44
-20
@@ -1460,26 +1460,50 @@ module TestUnzip {
|
||||
}
|
||||
|
||||
// _.without
|
||||
{
|
||||
let testWithoutArray: number[];
|
||||
let testWithoutList: _.List<number>;
|
||||
let result: number[];
|
||||
result = _.without<number>(testWithoutArray);
|
||||
result = _.without<number>(testWithoutArray, 1);
|
||||
result = _.without<number>(testWithoutArray, 1, 2);
|
||||
result = _.without<number>(testWithoutArray, 1, 2, 3);
|
||||
result = _.without<number>(testWithoutList);
|
||||
result = _.without<number>(testWithoutList, 1);
|
||||
result = _.without<number>(testWithoutList, 1, 2);
|
||||
result = _.without<number>(testWithoutList, 1, 2, 3);
|
||||
result = _(testWithoutArray).without().value();
|
||||
result = _(testWithoutArray).without(1).value();
|
||||
result = _(testWithoutArray).without(1, 2).value();
|
||||
result = _(testWithoutArray).without(1, 2, 3).value();
|
||||
result = _(testWithoutList).without<number>().value();
|
||||
result = _(testWithoutList).without<number>(1).value();
|
||||
result = _(testWithoutList).without<number>(1, 2).value();
|
||||
result = _(testWithoutList).without<number>(1, 2, 3).value();
|
||||
module TestWithout {
|
||||
let array: number[];
|
||||
let list: _.List<number>;
|
||||
|
||||
{
|
||||
let result: number[];
|
||||
|
||||
result = _.without<number>(array);
|
||||
result = _.without<number>(array, 1);
|
||||
result = _.without<number>(array, 1, 2);
|
||||
result = _.without<number>(array, 1, 2, 3);
|
||||
|
||||
result = _.without<number>(list);
|
||||
result = _.without<number>(list, 1);
|
||||
result = _.without<number>(list, 1, 2);
|
||||
result = _.without<number>(list, 1, 2, 3);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<number>;
|
||||
|
||||
result = _(array).without();
|
||||
result = _(array).without(1);
|
||||
result = _(array).without(1, 2);
|
||||
result = _(array).without(1, 2, 3);
|
||||
result = _(list).without<number>();
|
||||
result = _(list).without<number>(1);
|
||||
result = _(list).without<number>(1, 2);
|
||||
result = _(list).without<number>(1, 2, 3);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<number>;
|
||||
|
||||
result = _(array).chain().without();
|
||||
result = _(array).chain().without(1);
|
||||
result = _(array).chain().without(1, 2);
|
||||
result = _(array).chain().without(1, 2, 3);
|
||||
|
||||
result = _(list).chain().without<number>();
|
||||
result = _(list).chain().without<number>(1);
|
||||
result = _(list).chain().without<number>(1, 2);
|
||||
result = _(list).chain().without<number>(1, 2, 3);
|
||||
}
|
||||
}
|
||||
|
||||
// _.xor
|
||||
|
||||
Vendored
+16
-2
@@ -2810,7 +2810,7 @@ declare module _ {
|
||||
* @return Returns the new array of filtered values.
|
||||
*/
|
||||
without<T>(
|
||||
array: T[]|List<T>,
|
||||
array: List<T>,
|
||||
...values: T[]
|
||||
): T[];
|
||||
}
|
||||
@@ -2826,7 +2826,21 @@ declare module _ {
|
||||
/**
|
||||
* @see _.without
|
||||
*/
|
||||
without<TValue>(...values: TValue[]): LoDashImplicitArrayWrapper<TValue>;
|
||||
without<T>(...values: T[]): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.without
|
||||
*/
|
||||
without(...values: T[]): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.without
|
||||
*/
|
||||
without<T>(...values: T[]): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.xor
|
||||
|
||||
Reference in New Issue
Block a user