UNPKG

1.39 kBTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC 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/language-service/ivy/compiler_factory" />
9import { NgCompiler } from '@angular/compiler-cli/src/ngtsc/core';
10import { NgCompilerOptions } from '@angular/compiler-cli/src/ngtsc/core/api';
11import { TypeCheckingProgramStrategy } from '@angular/compiler-cli/src/ngtsc/typecheck/api';
12import { LanguageServiceAdapter } from './language_service_adapter';
13export declare class CompilerFactory {
14 private readonly adapter;
15 private readonly programStrategy;
16 private readonly incrementalStrategy;
17 private compiler;
18 private lastKnownProgram;
19 constructor(adapter: LanguageServiceAdapter, programStrategy: TypeCheckingProgramStrategy);
20 /**
21 * Create a new instance of the Ivy compiler if the program has changed since
22 * the last time the compiler was instantiated. If the program has not changed,
23 * return the existing instance.
24 * @param fileName override the template if this is an external template file
25 * @param options angular compiler options
26 */
27 getOrCreateWithChangedFile(fileName: string, options: NgCompilerOptions): NgCompiler;
28 private overrideTemplate;
29 registerLastKnownProgram(): void;
30}