/// import { EventEmitter } from 'events'; export declare class ResourceModule extends EventEmitter { static cache: { [key: string]: ResourceModule; }; /** * 监听资源 * @param file * @param syncNet */ static watch(file: string, _package?: string, syncNet?: string, fullPath?: boolean): ResourceModule; /** * 检查资源 * @param thread */ static checkResource(thread?: number): Promise; resData: { [tkey: string]: T; }; private file; private package; md5: string; private url; private constructor(); private init; on(event: 'change', listener: (...args: any[]) => void): this; once(event: 'change', listener: (...args: any[]) => void): this; private _onFileChange; private _loadFile; getAllRes(): { [tkey: string]: T; }; getRes(id: string): T | undefined; has(id: string): boolean; /** * 遍历 * @param func 返回 true的时候跳出循环 */ forEach(func: (value: T, key: string, res: this) => boolean | void): void; /** * 增加一个线上检查的过程 */ onlineCheck(): Promise; }