mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 22:10:30 +00:00
_(...).findLast
This commit is contained in:
@@ -400,6 +400,12 @@ result = <number>_.findLast([1, 2, 3, 4], function (num) {
|
||||
result = <IFoodCombined>_.findLast(foodsCombined, { 'type': 'vegetable' });
|
||||
result = <IFoodCombined>_.findLast(foodsCombined, 'organic');
|
||||
|
||||
result = <number>_([1, 2, 3, 4]).findLast(function (num) {
|
||||
return num % 2 == 0;
|
||||
});
|
||||
result = <IFoodCombined>_(foodsCombined).findLast({ 'type': 'vegetable' });
|
||||
result = <IFoodCombined>_(foodsCombined).findLast('organic');
|
||||
|
||||
result = <number[]>_.forEach([1, 2, 3], function (num) { console.log(num); });
|
||||
result = <_.Dictionary<number>>_.forEach({ 'one': 1, 'two': 2, 'three': 3 }, function (num) { console.log(num); });
|
||||
result = <IFoodType>_.forEach<IFoodType, string>({ name: 'apple', type: 'fruit' }, function (value, key) { console.log(value, key) });
|
||||
|
||||
Vendored
+22
@@ -2940,6 +2940,28 @@ declare module _ {
|
||||
pluckValue: string): T;
|
||||
}
|
||||
|
||||
interface LoDashArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.findLast
|
||||
*/
|
||||
findLast(
|
||||
callback: ListIterator<T, boolean>,
|
||||
thisArg?: any): T;
|
||||
/**
|
||||
* @see _.findLast
|
||||
* @param _.where style callback
|
||||
*/
|
||||
findLast<W>(
|
||||
whereValue: W): T;
|
||||
|
||||
/**
|
||||
* @see _.findLast
|
||||
* @param _.where style callback
|
||||
*/
|
||||
findLast(
|
||||
pluckValue: string): T;
|
||||
}
|
||||
|
||||
//_.forEach
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user