compiler_host.d.ts
2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import * as ts from 'typescript';
import NgOptions from './options';
export declare function formatDiagnostics(d: ts.Diagnostic[]): string;
/**
* Implementation of CompilerHost that forwards all methods to another instance.
* Useful for partial implementations to override only methods they care about.
*/
export declare abstract class DelegatingHost implements ts.CompilerHost {
protected delegate: ts.CompilerHost;
constructor(delegate: ts.CompilerHost);
getSourceFile: (fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void) => ts.SourceFile;
getCancellationToken: () => ts.CancellationToken;
getDefaultLibFileName: (options: ts.CompilerOptions) => string;
getDefaultLibLocation: () => string;
writeFile: ts.WriteFileCallback;
getCurrentDirectory: () => string;
getDirectories: (path: string) => string[];
getCanonicalFileName: (fileName: string) => string;
useCaseSensitiveFileNames: () => boolean;
getNewLine: () => string;
fileExists: (fileName: string) => boolean;
readFile: (fileName: string) => string;
trace: (s: string) => void;
directoryExists: (directoryName: string) => boolean;
}
export declare class MetadataWriterHost extends DelegatingHost {
private ngOptions;
private emitAllFiles;
private metadataCollector;
private metadataCollector1;
constructor(delegate: ts.CompilerHost, ngOptions: NgOptions, emitAllFiles: boolean);
private writeMetadata(emitFilePath, sourceFile);
writeFile: ts.WriteFileCallback;
}
export declare class SyntheticIndexHost extends DelegatingHost {
private normalSyntheticIndexName;
private indexContent;
private indexMetadata;
constructor(delegate: ts.CompilerHost, syntheticIndex: {
name: string;
content: string;
metadata: string;
});
fileExists: (fileName: string) => boolean;
readFile: (fileName: string) => string;
getSourceFile: (fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void) => ts.SourceFile;
writeFile: ts.WriteFileCallback;
}