1
This commit is contained in:
15
20220330_Vote/Ewide.Web.Entry/wwwroot/lib/xe-utils/once.d.ts
vendored
Normal file
15
20220330_Vote/Ewide.Web.Entry/wwwroot/lib/xe-utils/once.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* 创建一个只能调用一次的函数,只会返回第一次执行后的结果
|
||||
* @param callback 回调
|
||||
* @param context 上下文
|
||||
* @param params 额外的参数
|
||||
*/
|
||||
export declare function once<S, C>(callback: (this: S, ...args: any[]) => any, context?: C, ...params: any[]): (this: S | C, ...args: any[]) => any;
|
||||
|
||||
declare module './ctor' {
|
||||
interface XEUtilsMethods {
|
||||
once: typeof once;
|
||||
}
|
||||
}
|
||||
|
||||
export default once
|
||||
Reference in New Issue
Block a user