1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import ts from 'typescript';
|
10 | import * as api from '../transformers/api';
|
11 | import { NgCompiler } from './core';
|
12 | import { NgCompilerOptions } from './core/api';
|
13 | import { IndexedComponent } from './indexer';
|
14 | import { DeclarationNode } from './reflection';
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export declare class NgtscProgram implements api.Program {
|
21 | private options;
|
22 | readonly compiler: NgCompiler;
|
23 | |
24 |
|
25 |
|
26 | private tsProgram;
|
27 | private host;
|
28 | private incrementalStrategy;
|
29 | constructor(rootNames: ReadonlyArray<string>, options: NgCompilerOptions, delegateHost: api.CompilerHost, oldProgram?: NgtscProgram);
|
30 | getTsProgram(): ts.Program;
|
31 | getReuseTsProgram(): ts.Program;
|
32 | getTsOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
33 | getTsSyntacticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
34 | getTsSemanticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
35 | getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
36 | getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
37 | getNgSemanticDiagnostics(fileName?: string | undefined, cancellationToken?: ts.CancellationToken | undefined): readonly ts.Diagnostic[];
|
38 | /**
|
39 | * Ensure that the `NgCompiler` has properly analyzed the program, and allow for the asynchronous
|
40 | * loading of any resources during the process.
|
41 | *
|
42 | * This is used by the Angular CLI to allow for spawning (async) child compilations for things
|
43 | * like SASS files used in `styleUrls`.
|
44 | */
|
45 | loadNgStructureAsync(): Promise<void>;
|
46 | listLazyRoutes(entryRoute?: string | undefined): api.LazyRoute[];
|
47 | private emitXi18n;
|
48 | emit(opts?: {
|
49 | emitFlags?: api.EmitFlags | undefined;
|
50 | forceEmit?: boolean;
|
51 | cancellationToken?: ts.CancellationToken | undefined;
|
52 | customTransformers?: api.CustomTransformers | undefined;
|
53 | emitCallback?: api.TsEmitCallback | undefined;
|
54 | mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback | undefined;
|
55 | } | undefined): ts.EmitResult;
|
56 | getIndexedComponents(): Map<DeclarationNode, IndexedComponent>;
|
57 | getEmittedSourceFiles(): Map<string, ts.SourceFile>;
|
58 | }
|