blob: 1349e30406d4ef07c446dde7f3bb29fff804cdbb (
plain)
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
|
import * as ts from 'typescript';
import { File } from './input';
import { Host } from './host';
import { ProjectInfo } from './project';
export interface ICompiler {
prepare(project: ProjectInfo): void;
inputFile(file: File): void;
inputDone(): void;
}
/**
* Compiles a whole project, with full type checking
*/
export declare class ProjectCompiler implements ICompiler {
host: Host;
project: ProjectInfo;
program: ts.Program;
private hasSourceMap;
prepare(project: ProjectInfo): void;
inputFile(file: File): void;
inputDone(): void;
private emitFile(result, currentDirectory, file?);
private reportDiagnostics(diagnostics);
private removeSourceMapComment(content);
}
export declare class FileCompiler implements ICompiler {
host: Host;
project: ProjectInfo;
private output;
private previousOutput;
private compilationResult;
prepare(project: ProjectInfo): void;
private write(file, fileName, diagnostics, content, sourceMap);
inputFile(file: File): void;
inputDone(): void;
}
|