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
|
import { Compiler, CompilerOptions, Component, ComponentFactory, Directive, Injector, NgModule, Pipe, Type } from '@angular/core';
|
9
|
import { MetadataOverride } from './metadata_override';
|
10
|
/**
|
11
|
* Special interface to the compiler only used by testing
|
12
|
*
|
13
|
* @experimental
|
14
|
*/
|
15
|
export declare class TestingCompiler extends Compiler {
|
16
|
readonly injector: Injector;
|
17
|
overrideModule(module: Type<any>, overrides: MetadataOverride<NgModule>): void;
|
18
|
overrideDirective(directive: Type<any>, overrides: MetadataOverride<Directive>): void;
|
19
|
overrideComponent(component: Type<any>, overrides: MetadataOverride<Component>): void;
|
20
|
overridePipe(directive: Type<any>, overrides: MetadataOverride<Pipe>): void;
|
21
|
/**
|
22
|
* Allows to pass the compile summary from AOT compilation to the JIT compiler,
|
23
|
* so that it can use the code generated by AOT.
|
24
|
*/
|
25
|
loadAotSummaries(summaries: () => any[]): void;
|
26
|
/**
|
27
|
* Gets the component factory for the given component.
|
28
|
* This assumes that the component has been compiled before calling this call using
|
29
|
* `compileModuleAndAllComponents*`.
|
30
|
*/
|
31
|
getComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
32
|
}
|
33
|
/**
|
34
|
* A factory for creating a Compiler
|
35
|
*
|
36
|
* @experimental
|
37
|
*/
|
38
|
export declare abstract class TestingCompilerFactory {
|
39
|
abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler;
|
40
|
}
|