1 | import { CancellationToken, CompilerHost, CompilerOptions, ScriptTarget, SourceFile } from 'typescript';
|
2 | import { VirtualFileSystem } from '../util/interfaces';
|
3 | export interface OnErrorFn {
|
4 | (message: string): void;
|
5 | }
|
6 | export declare class FileSystemCompilerHost implements CompilerHost {
|
7 | private options;
|
8 | private fileSystem;
|
9 | private setParentNodes;
|
10 | private diskCompilerHost;
|
11 | constructor(options: CompilerOptions, fileSystem: VirtualFileSystem, setParentNodes?: boolean);
|
12 | fileExists(filePath: string): boolean;
|
13 | readFile(filePath: string): string;
|
14 | directoryExists(directoryPath: string): boolean;
|
15 | getFiles(directoryPath: string): string[];
|
16 | getDirectories(directoryPath: string): string[];
|
17 | getSourceFile(filePath: string, languageVersion: ScriptTarget, onError?: OnErrorFn): SourceFile;
|
18 | getCancellationToken(): CancellationToken;
|
19 | getDefaultLibFileName(options: CompilerOptions): string;
|
20 | writeFile(fileName: string, data: string, writeByteOrderMark: boolean, onError?: OnErrorFn): void;
|
21 | getCurrentDirectory(): string;
|
22 | getCanonicalFileName(fileName: string): string;
|
23 | useCaseSensitiveFileNames(): boolean;
|
24 | getNewLine(): string;
|
25 | }
|