You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
631 B
23 lines
631 B
/**
|
|
* 从左至右遍历,匹配最近的一条数据
|
|
* @param array 数组
|
|
* @param iterate 回调
|
|
* @param context 上下文
|
|
*/
|
|
export declare function find<T, C>(list: T[], iterate: (this: C, item: T, index: number, list: T[]) => boolean, context?: C): T;
|
|
|
|
/**
|
|
* 从左至右遍历,匹配最近的一条数据
|
|
* @param obj 对象
|
|
* @param iterate 回调
|
|
* @param context 上下文
|
|
*/
|
|
export declare function find<T, C>(obj: T, iterate: (this: C, item: any, key: string, obj: T) => boolean, context?: C): any;
|
|
|
|
declare module './ctor' {
|
|
interface XEUtilsMethods {
|
|
find: typeof find;
|
|
}
|
|
}
|
|
|
|
export default find
|
|
|