1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import ts from 'typescript';
|
9 | import * as api from '../transformers/api';
|
10 | import { NgCompiler } from './core';
|
11 | import { NgCompilerOptions } from './core/api';
|
12 | import { DocEntry } from './docs';
|
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<CbEmitRes extends ts.EmitResult>(opts?: api.EmitOptions<CbEmitRes> | undefined): ts.EmitResult;
|
49 | getIndexedComponents(): Map<DeclarationNode, IndexedComponent>;
|
50 | /**
|
51 | * Gets information for the current program that may be used to generate API
|
52 | * reference documentation. This includes Angular-specific information, such
|
53 | * as component inputs and outputs.
|
54 | *
|
55 | * @param entryPoint Path to the entry point for the package for which API
|
56 | * docs should be extracted.
|
57 | */
|
58 | getApiDocumentation(entryPoint: string, privateModules: Set<string>): {
|
59 | entries: DocEntry[];
|
60 | symbols: Map<string, string>;
|
61 | };
|
62 | getEmittedSourceFiles(): Map<string, ts.SourceFile>;
|
63 | }
|