Added chainable definitions for _(...).reject

This commit is contained in:
Brian Zengel
2014-06-02 22:06:14 -04:00
parent 0fad808e8d
commit be19adcd82
2 changed files with 25 additions and 0 deletions
+4
View File
@@ -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);
+21
View File
@@ -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 {
/**