UNPKG

2.95 kBTypeScriptView Raw
1import * as ts from 'typescript';
2import { ResolveModuleName, ResolveTypeReferenceDirective } from './resolution';
3import { VueOptions } from './types/vue-options';
4export declare class CompilerHost implements ts.WatchCompilerHostOfConfigFile<ts.EmitAndSemanticDiagnosticsBuilderProgram> {
5 private typescript;
6 private vueOptions;
7 private program?;
8 getProgram(): ts.Program;
9 getAllKnownFiles(): Set<string>;
10 configFileName: string;
11 optionsToExtend: ts.CompilerOptions;
12 private directoryWatchers;
13 private fileWatchers;
14 private knownFiles;
15 private gatheredDiagnostic;
16 private afterCompile;
17 private readonly tsHost;
18 protected lastProcessing?: Promise<ts.Diagnostic[]>;
19 private compilationStarted;
20 resolveModuleNames: ((moduleNames: string[], containingFile: string, reusedNames?: string[] | undefined, redirectedReference?: ts.ResolvedProjectReference | undefined) => (ts.ResolvedModule | undefined)[]) | undefined;
21 resolveTypeReferenceDirectives: ((typeReferenceDirectiveNames: string[], containingFile: string, redirectedReference?: ts.ResolvedProjectReference | undefined) => (ts.ResolvedTypeReferenceDirective | undefined)[]) | undefined;
22 constructor(typescript: typeof ts, vueOptions: VueOptions, programConfigFile: string, compilerOptions: ts.CompilerOptions, checkSyntacticErrors: boolean, userResolveModuleName?: ResolveModuleName, userResolveTypeReferenceDirective?: ResolveTypeReferenceDirective);
23 processChanges(): Promise<{
24 results: ts.Diagnostic[];
25 updatedFiles: string[];
26 removedFiles: string[];
27 }>;
28 setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): any;
29 clearTimeout(timeoutId: any): void;
30 onWatchStatusChange(): void;
31 watchDirectory(path: string, callback: ts.DirectoryWatcherCallback, recursive?: boolean): ts.FileWatcher;
32 watchFile(path: string, callback: ts.FileWatcherCallback, pollingInterval?: number): ts.FileWatcher;
33 fileExists(path: string): boolean;
34 readFile(path: string, encoding?: string): string | undefined;
35 directoryExists(path: string): boolean;
36 getDirectories(path: string): string[];
37 readDirectory(path: string, extensions?: ReadonlyArray<string>, exclude?: ReadonlyArray<string>, include?: ReadonlyArray<string>, depth?: number): string[];
38 createProgram: typeof ts.createEmitAndSemanticDiagnosticsBuilderProgram;
39 getCurrentDirectory(): string;
40 getDefaultLibFileName(options: ts.CompilerOptions): string;
41 getEnvironmentVariable(name: string): string | undefined;
42 getNewLine(): string;
43 realpath(path: string): string;
44 trace(s: string): void;
45 useCaseSensitiveFileNames(): boolean;
46 onUnRecoverableConfigFileDiagnostic(): void;
47 afterProgramCreate(program: ts.EmitAndSemanticDiagnosticsBuilderProgram): void;
48 createDirectory(): void;
49 writeFile(): void;
50 onCachedDirectoryStructureHostCreate?(): void;
51}
52
\No newline at end of file