mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-04 16:04:45 +08:00
Added chainable definitions for _(...).reject
This commit is contained in:
@@ -499,6 +499,10 @@ result = <number[]>_.reject([1, 2, 3, 4, 5, 6], function (num) { return num % 2
|
||||
result = <IFoodCombined[]>_.reject(foodsCombined, 'organic');
|
||||
result = <IFoodCombined[]>_.reject(foodsCombined, { 'type': 'fruit' });
|
||||
|
||||
result = <number[]>_([1, 2, 3, 4, 5, 6]).reject(function (num) { return num % 2 == 0; }).value();
|
||||
result = <IFoodCombined[]>_(foodsCombined).reject('organic').value();
|
||||
result = <IFoodCombined[]>_(foodsCombined).reject({ 'type': 'fruit' }).value();
|
||||
|
||||
result = <number>_.sample([1, 2, 3, 4]);
|
||||
result = <number[]>_.sample([1, 2, 3, 4], 2);
|
||||
|
||||
|
||||
Vendored
+21
@@ -4016,6 +4016,27 @@ declare module _ {
|
||||
whereValue: W): T[];
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.reject
|
||||
**/
|
||||
reject(
|
||||
callback: ListIterator<T, boolean>,
|
||||
thisArg?: any): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.reject
|
||||
* @param pluckValue _.pluck style callback
|
||||
**/
|
||||
reject(pluckValue: string): LoDashArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.reject
|
||||
* @param whereValue _.where style callback
|
||||
**/
|
||||
reject<W>(whereValue: W): LoDashArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.sample
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user