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 | import { Compiler, Injectable } from '@angular/core';
|
---|
9 | function unimplemented() {
|
---|
10 | throw Error('unimplemented');
|
---|
11 | }
|
---|
12 | /**
|
---|
13 | * Special interface to the compiler only used by testing
|
---|
14 | *
|
---|
15 | * @publicApi
|
---|
16 | */
|
---|
17 | export class TestingCompiler extends Compiler {
|
---|
18 | get injector() {
|
---|
19 | throw unimplemented();
|
---|
20 | }
|
---|
21 | overrideModule(module, overrides) {
|
---|
22 | throw unimplemented();
|
---|
23 | }
|
---|
24 | overrideDirective(directive, overrides) {
|
---|
25 | throw unimplemented();
|
---|
26 | }
|
---|
27 | overrideComponent(component, overrides) {
|
---|
28 | throw unimplemented();
|
---|
29 | }
|
---|
30 | overridePipe(directive, overrides) {
|
---|
31 | throw unimplemented();
|
---|
32 | }
|
---|
33 | /**
|
---|
34 | * Allows to pass the compile summary from AOT compilation to the JIT compiler,
|
---|
35 | * so that it can use the code generated by AOT.
|
---|
36 | */
|
---|
37 | loadAotSummaries(summaries) {
|
---|
38 | throw unimplemented();
|
---|
39 | }
|
---|
40 | /**
|
---|
41 | * Gets the component factory for the given component.
|
---|
42 | * This assumes that the component has been compiled before calling this call using
|
---|
43 | * `compileModuleAndAllComponents*`.
|
---|
44 | */
|
---|
45 | getComponentFactory(component) {
|
---|
46 | throw unimplemented();
|
---|
47 | }
|
---|
48 | /**
|
---|
49 | * Returns the component type that is stored in the given error.
|
---|
50 | * This can be used for errors created by compileModule...
|
---|
51 | */
|
---|
52 | getComponentFromError(error) {
|
---|
53 | throw unimplemented();
|
---|
54 | }
|
---|
55 | }
|
---|
56 | TestingCompiler.decorators = [
|
---|
57 | { type: Injectable }
|
---|
58 | ];
|
---|
59 | /**
|
---|
60 | * A factory for creating a Compiler
|
---|
61 | *
|
---|
62 | * @publicApi
|
---|
63 | */
|
---|
64 | export class TestingCompilerFactory {
|
---|
65 | }
|
---|
66 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdF9jb21waWxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvcmUvdGVzdGluZy9zcmMvdGVzdF9jb21waWxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7O0dBTUc7QUFFSCxPQUFPLEVBQUMsUUFBUSxFQUEyRCxVQUFVLEVBQWlDLE1BQU0sZUFBZSxDQUFDO0FBSTVJLFNBQVMsYUFBYTtJQUNwQixNQUFNLEtBQUssQ0FBQyxlQUFlLENBQUMsQ0FBQztBQUMvQixDQUFDO0FBRUQ7Ozs7R0FJRztBQUVILE1BQU0sT0FBTyxlQUFnQixTQUFRLFFBQVE7SUFDM0MsSUFBSSxRQUFRO1FBQ1YsTUFBTSxhQUFhLEVBQUUsQ0FBQztJQUN4QixDQUFDO0lBQ0QsY0FBYyxDQUFDLE1BQWlCLEVBQUUsU0FBcUM7UUFDckUsTUFBTSxhQUFhLEVBQUUsQ0FBQztJQUN4QixDQUFDO0lBQ0QsaUJBQWlCLENBQUMsU0FBb0IsRUFBRSxTQUFzQztRQUM1RSxNQUFNLGFBQWEsRUFBRSxDQUFDO0lBQ3hCLENBQUM7SUFDRCxpQkFBaUIsQ0FBQyxTQUFvQixFQUFFLFNBQXNDO1FBQzVFLE1BQU0sYUFBYSxFQUFFLENBQUM7SUFDeEIsQ0FBQztJQUNELFlBQVksQ0FBQyxTQUFvQixFQUFFLFNBQWlDO1FBQ2xFLE1BQU0sYUFBYSxFQUFFLENBQUM7SUFDeEIsQ0FBQztJQUNEOzs7T0FHRztJQUNILGdCQUFnQixDQUFDLFNBQXNCO1FBQ3JDLE1BQU0sYUFBYSxF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