1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import { Position } from '@angular/compiler';
|
10 | import * as ts from 'typescript';
|
11 | import * as api from './transformers/api';
|
12 | export declare type Diagnostics = ReadonlyArray<ts.Diagnostic | api.Diagnostic>;
|
13 | export declare function filterErrorsAndWarnings(diagnostics: Diagnostics): Diagnostics;
|
14 | export declare function formatDiagnosticPosition(position: Position, host?: ts.FormatDiagnosticsHost): string;
|
15 | export declare function flattenDiagnosticMessageChain(chain: api.DiagnosticMessageChain, host?: ts.FormatDiagnosticsHost): string;
|
16 | export declare function formatDiagnostic(diagnostic: api.Diagnostic, host?: ts.FormatDiagnosticsHost): string;
|
17 | export declare function formatDiagnostics(diags: Diagnostics, host?: ts.FormatDiagnosticsHost): string;
|
18 | export interface ParsedConfiguration {
|
19 | project: string;
|
20 | options: api.CompilerOptions;
|
21 | rootNames: string[];
|
22 | emitFlags: api.EmitFlags;
|
23 | errors: Diagnostics;
|
24 | }
|
25 | export declare function calcProjectFileAndBasePath(project: string): {
|
26 | projectFile: string;
|
27 | basePath: string;
|
28 | };
|
29 | export declare function createNgCompilerOptions(basePath: string, config: any, tsOptions: ts.CompilerOptions): api.CompilerOptions;
|
30 | export declare function readConfiguration(project: string, existingOptions?: ts.CompilerOptions): ParsedConfiguration;
|
31 | export interface PerformCompilationResult {
|
32 | diagnostics: Diagnostics;
|
33 | program?: api.Program;
|
34 | emitResult?: ts.EmitResult;
|
35 | }
|
36 | export declare function exitCodeFromResult(diags: Diagnostics | undefined): number;
|
37 | export declare function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics, customTransformers, emitFlags }: {
|
38 | rootNames: string[];
|
39 | options: api.CompilerOptions;
|
40 | host?: api.CompilerHost;
|
41 | oldProgram?: api.Program;
|
42 | emitCallback?: api.TsEmitCallback;
|
43 | mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback;
|
44 | gatherDiagnostics?: (program: api.Program) => Diagnostics;
|
45 | customTransformers?: api.CustomTransformers;
|
46 | emitFlags?: api.EmitFlags;
|
47 | }): PerformCompilationResult;
|