UNPKG

1.19 kBTypeScriptView Raw
1import * as ts from "typescript";
2import SourceCache from "./compiler/source-cache";
3import { AbsolutePath, DiagnosticsHandler, NormalizedOptions } from "./interfaces";
4export default class Compiler {
5 inputPath: AbsolutePath;
6 outputPath: AbsolutePath;
7 options: NormalizedOptions;
8 private diagnosticsHandler;
9 private resolver;
10 private workingPath;
11 private rootPath;
12 private buildPath;
13 private input;
14 private configParser;
15 private sourceCache;
16 private output;
17 private program;
18 constructor(inputPath: AbsolutePath, outputPath: AbsolutePath, options: NormalizedOptions, diagnosticsHandler: DiagnosticsHandler);
19 compile(): void;
20 protected parseConfig(): ts.ParsedCommandLine;
21 protected getSourceCache(options: ts.CompilerOptions): SourceCache;
22 protected createProgram(config: ts.ParsedCommandLine, sourceCache: SourceCache): ts.Program;
23 protected emitDiagnostics(program: ts.Program): void;
24 protected resolveBuildPath(options: ts.CompilerOptions): AbsolutePath;
25 protected emitProgram(program: ts.Program, buildPath: AbsolutePath): void;
26 protected patchOutput(): void;
27 protected resetCaches(): void;
28}