Files
number_zj/20220330_Vote/Ewide.Web.Entry/wwwroot/lib/xe-utils/before.d.ts
毛财君 197b38ca6f 1
2023-07-06 17:37:33 +08:00

16 lines
460 B
TypeScript

/**
* 创建一个函数, 调用次数不超过 count 次之前执行回调并将所有结果记住后返回
* @param count 次数
* @param callback 回调
* @param context 上下文
*/
export declare function before<C>(count: number, callback: (this: C, rests: any[], ...args: any[]) => any, context?: C): (this: any, ...args: any[]) => any;
declare module './ctor' {
interface XEUtilsMethods {
before: typeof before;
}
}
export default before