1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import ts from 'typescript';
|
9 | import { ParsedConfiguration } from './perform_compile';
|
10 | import * as api from './transformers/api';
|
11 | export declare enum FileChangeEvent {
|
12 | Change = 0,
|
13 | CreateDelete = 1,
|
14 | CreateDeleteDir = 2
|
15 | }
|
16 | export interface PerformWatchHost<CbEmitRes extends ts.EmitResult = ts.EmitResult> {
|
17 | reportDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void;
|
18 | readConfiguration(): ParsedConfiguration;
|
19 | createCompilerHost(options: api.CompilerOptions): api.CompilerHost;
|
20 | createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback<CbEmitRes> | undefined;
|
21 | onFileChange(options: api.CompilerOptions, listener: (event: FileChangeEvent, fileName: string) => void, ready: () => void): {
|
22 | close: () => void;
|
23 | };
|
24 | setTimeout(callback: () => void, ms: number): any;
|
25 | clearTimeout(timeoutId: any): void;
|
26 | }
|
27 | export declare function createPerformWatchHost<CbEmitRes extends ts.EmitResult = ts.EmitResult>(configFileName: string, reportDiagnostics: (diagnostics: ReadonlyArray<ts.Diagnostic>) => void, existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) => api.TsEmitCallback<CbEmitRes> | undefined): PerformWatchHost;
|
28 |
|
29 |
|
30 |
|
31 | export declare function performWatchCompilation(host: PerformWatchHost): {
|
32 | close: () => void;
|
33 | ready: (cb: () => void) => void;
|
34 | firstCompileResult: ReadonlyArray<ts.Diagnostic>;
|
35 | };
|