/// /** * 同步延迟执行 */ declare type DelayFunc = (...args: any[]) => any; export declare const delay: (func: DelayFunc, wait: number, ...args: any[]) => NodeJS.Timeout; /** * 异步延迟执行 */ declare type AsyncDelayFunc = (...args: any[]) => Promise; export declare const asyncDelay: (func: AsyncDelayFunc, wait: number, ...args: any[]) => Promise; /** * 休眠函数 * @param wait */ export declare const sleep: (wait: number) => Promise; export {};