UNPKG

2.4 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google Inc. All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8/// <amd-module name="@angular/compiler-cli/src/transformers/tsc_pass_through" />
9import { GeneratedFile } from '@angular/compiler';
10import * as ts from 'typescript';
11import * as api from '../transformers/api';
12/**
13 * An implementation of the `Program` API which behaves similarly to plain `tsc`.
14 *
15 * The only Angular specific behavior included in this `Program` is the operation of the Ivy
16 * switch to turn on render3 behavior.
17 *
18 * This allows `ngc` to behave like `tsc` in cases where JIT code needs to be tested.
19 */
20export declare class TscPassThroughProgram implements api.Program {
21 private options;
22 private host;
23 private tsProgram;
24 constructor(rootNames: ReadonlyArray<string>, options: api.CompilerOptions, host: api.CompilerHost, oldProgram?: api.Program);
25 getTsProgram(): ts.Program;
26 getTsOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<ts.Diagnostic>;
27 getNgOptionDiagnostics(cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<api.Diagnostic>;
28 getTsSyntacticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<ts.Diagnostic>;
29 getNgStructuralDiagnostics(cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<api.Diagnostic>;
30 getTsSemanticDiagnostics(sourceFile?: ts.SourceFile | undefined, cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<ts.Diagnostic>;
31 getNgSemanticDiagnostics(fileName?: string | undefined, cancellationToken?: ts.CancellationToken | undefined): ReadonlyArray<api.Diagnostic>;
32 loadNgStructureAsync(): Promise<void>;
33 listLazyRoutes(entryRoute?: string | undefined): api.LazyRoute[];
34 getLibrarySummaries(): Map<string, api.LibrarySummary>;
35 getEmittedGeneratedFiles(): Map<string, GeneratedFile>;
36 getEmittedSourceFiles(): Map<string, ts.SourceFile>;
37 emit(opts?: {
38 emitFlags?: api.EmitFlags;
39 cancellationToken?: ts.CancellationToken;
40 customTransformers?: api.CustomTransformers;
41 emitCallback?: api.TsEmitCallback;
42 mergeEmitResultsCallback?: api.TsMergeEmitResultsCallback;
43 }): ts.EmitResult;
44}