(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean)
| 17 | } |
| 18 | |
| 19 | export function findLast<T>(array: Array<T>, predicate: (value: T, index: number, obj: T[]) => boolean): T | undefined { |
| 20 | const index = findLastIndex(array, predicate) |
| 21 | return index === -1 ? undefined : array[index] |
| 22 | } |
no test coverage detected