diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 2017252ffd..f45f2fb04a 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -270,6 +270,7 @@ result = _.range(0); result = _.remove([1, 2, 3, 4, 5, 6], function (num: number) { return num % 2 == 0; }); result = _.remove(foodsOrganic, 'organic'); result = _.remove(foodsType, { 'type': 'vegetable' }); +var typedResult: IFoodType[] = _.remove([ { name: 'apple' }, { name: 'orange' }], { name: 'orange' }); result = _.sortedIndex([20, 30, 50], 40); result = _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index dfa5e2e6a0..a3523fe9ff 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1296,6 +1296,14 @@ declare module _ { remove( array: List, wherealue?: Dictionary): any[]; + + /** + * @see _.remove + * @param item The item to remove + **/ + remove( + array:Array, + item:T): T[]; } //_.rest