src/vs/base/common/arrays.ts/findLast
export function findLast<T>(arr: readonly T[], predicate: (item: T) => boolean): T | undefined {
	const idx = lastIndex(arr, predicate);
	if (idx === -1) {
		return undefined;
	}
	return arr[idx];
}