UNPKG

675 BTypeScriptView Raw
1/**
2 * 从右至左遍历,匹配最近的一条数据
3 * @param array 数组
4 * @param iterate 回调
5 * @param context 上下文
6 */
7export declare function findLast<T, C>(array: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;
8
9/**
10 * 从右至左遍历,匹配最近的一条数据
11 * @param obj 对象
12 * @param iterate 回调
13 * @param context 上下文
14 */
15export declare function findLast<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;
16
17declare module './ctor' {
18 interface XEUtilsMethods {
19 findLast: typeof findLast;
20 }
21}
22
23export default findLast