diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index a4b46fb6c..c36e211c2 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -499,6 +499,10 @@ result = _.reject([1, 2, 3, 4, 5, 6], function (num) { return num % 2 result = _.reject(foodsCombined, 'organic'); result = _.reject(foodsCombined, { 'type': 'fruit' }); +result = _([1, 2, 3, 4, 5, 6]).reject(function (num) { return num % 2 == 0; }).value(); +result = _(foodsCombined).reject('organic').value(); +result = _(foodsCombined).reject({ 'type': 'fruit' }).value(); + result = _.sample([1, 2, 3, 4]); result = _.sample([1, 2, 3, 4], 2); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 8d373d993..c3089b06a 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -4016,6 +4016,27 @@ declare module _ { whereValue: W): T[]; } + interface LoDashArrayWrapper { + /** + * @see _.reject + **/ + reject( + callback: ListIterator, + thisArg?: any): LoDashArrayWrapper; + + /** + * @see _.reject + * @param pluckValue _.pluck style callback + **/ + reject(pluckValue: string): LoDashArrayWrapper; + + /** + * @see _.reject + * @param whereValue _.where style callback + **/ + reject(whereValue: W): LoDashArrayWrapper; + } + //_.sample interface LoDashStatic { /**