1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import ts from 'typescript';
|
9 | import { AbsoluteFsPath, ReadonlyFileSystem } from '../src/ngtsc/file_system';
|
10 | import * as api from './transformers/api';
|
11 | export declare function formatDiagnostics(diags: ReadonlyArray<ts.Diagnostic>, host?: ts.FormatDiagnosticsHost): string;
|
12 |
|
13 | export type ConfigurationHost = Pick<ReadonlyFileSystem, 'readFile' | 'exists' | 'lstat' | 'resolve' | 'join' | 'dirname' | 'extname' | 'pwd'>;
|
14 | export interface ParsedConfiguration {
|
15 | project: string;
|
16 | options: api.CompilerOptions;
|
17 | rootNames: string[];
|
18 | projectReferences?: readonly ts.ProjectReference[] | undefined;
|
19 | emitFlags: api.EmitFlags;
|
20 | errors: ts.Diagnostic[];
|
21 | }
|
22 | export declare function calcProjectFileAndBasePath(project: string, host?: ConfigurationHost): {
|
23 | projectFile: AbsoluteFsPath;
|
24 | basePath: AbsoluteFsPath;
|
25 | };
|
26 | export declare function readConfiguration(project: string, existingOptions?: api.CompilerOptions, host?: ConfigurationHost): ParsedConfiguration;
|
27 | export interface PerformCompilationResult {
|
28 | diagnostics: ReadonlyArray<ts.Diagnostic>;
|
29 | program?: api.Program;
|
30 | emitResult?: ts.EmitResult;
|
31 | }
|
32 | export declare function exitCodeFromResult(diags: ReadonlyArray<ts.Diagnostic> | undefined): number;
|
33 | export declare function performCompilation<CbEmitRes extends ts.EmitResult = ts.EmitResult>({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics, customTransformers, emitFlags, forceEmit, modifiedResourceFiles, }: {
|
34 | rootNames: string[];
|
35 | options: api.CompilerOptions;
|
36 | host?: api.CompilerHost;
|
37 | oldProgram?: api.Program;
|
38 | emitCallback?: api.TsEmitCallback<CbEmitRes>;
|
39 | mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback<CbEmitRes>;
|
40 | gatherDiagnostics?: (program: api.Program) => ReadonlyArray<ts.Diagnostic>;
|
41 | customTransformers?: api.CustomTransformers;
|
42 | emitFlags?: api.EmitFlags;
|
43 | forceEmit?: boolean;
|
44 | modifiedResourceFiles?: Set<string> | null;
|
45 | }): PerformCompilationResult;
|
46 | export declare function defaultGatherDiagnostics(program: api.Program): ReadonlyArray<ts.Diagnostic>;
|