mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.6 KiB
35 lines
1.6 KiB
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.dev/license
|
|
*/
|
|
import ts from 'typescript';
|
|
import { ParsedConfiguration } from './perform_compile';
|
|
import * as api from './transformers/api';
|
|
export declare enum FileChangeEvent {
|
|
Change = 0,
|
|
CreateDelete = 1,
|
|
CreateDeleteDir = 2
|
|
}
|
|
export interface PerformWatchHost<CbEmitRes extends ts.EmitResult = ts.EmitResult> {
|
|
reportDiagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void;
|
|
readConfiguration(): ParsedConfiguration;
|
|
createCompilerHost(options: api.CompilerOptions): api.CompilerHost;
|
|
createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback<CbEmitRes> | undefined;
|
|
onFileChange(options: api.CompilerOptions, listener: (event: FileChangeEvent, fileName: string) => void, ready: () => void): {
|
|
close: () => void;
|
|
};
|
|
setTimeout(callback: () => void, ms: number): any;
|
|
clearTimeout(timeoutId: any): void;
|
|
}
|
|
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;
|
|
/**
|
|
* The logic in this function is adapted from `tsc.ts` from TypeScript.
|
|
*/
|
|
export declare function performWatchCompilation(host: PerformWatchHost): {
|
|
close: () => void;
|
|
ready: (cb: () => void) => void;
|
|
firstCompileResult: ReadonlyArray<ts.Diagnostic>;
|
|
};
|
|
|