1declare namespace ts.server { 2 export interface CompressedData { 3 length: number; 4 compressionKind: string; 5 data: any; 6 } 7 8 export type ModuleImportResult = { module: {}, error: undefined } | { module: undefined, error: { stack?: string, message?: string } }; 9 10 /** @deprecated Use {@link ModuleImportResult} instead. */ 11 export type RequireResult = ModuleImportResult; 12 13 export interface ServerHost extends System { 14 watchFile(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher; 15 watchDirectory(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher; 16 setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any; 17 clearTimeout(timeoutId: any): void; 18 setImmediate(callback: (...args: any[]) => void, ...args: any[]): any; 19 clearImmediate(timeoutId: any): void; 20 gc?(): void; 21 trace?(s: string): void; 22 require?(initialPath: string, moduleName: string): ModuleImportResult; 23 /*@internal*/ 24 importPlugin?(root: string, moduleName: string): Promise<ModuleImportResult>; 25 getJsDocNodeCheckedConfig?(fileCheckedInfo: FileCheckModuleInfo, symbolSourceFilePath: string): JsDocNodeCheckConfig; 26 getJsDocNodeConditionCheckedResult?(fileCheckedInfo: FileCheckModuleInfo, jsDocs: JsDocTagInfo[]): ConditionCheckResult; 27 getFileCheckedModuleInfo?(containFilePath: string): FileCheckModuleInfo; 28 } 29} 30