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 { CompileReflector } from '../compile_reflector';
|
---|
9 | import * as o from '../output/output_ast';
|
---|
10 | import { SummaryResolver } from '../summary_resolver';
|
---|
11 | import { StaticSymbol } from './static_symbol';
|
---|
12 | import { StaticSymbolResolver } from './static_symbol_resolver';
|
---|
13 | /**
|
---|
14 | * A static reflector implements enough of the Reflector API that is necessary to compile
|
---|
15 | * templates statically.
|
---|
16 | */
|
---|
17 | export declare class StaticReflector implements CompileReflector {
|
---|
18 | private summaryResolver;
|
---|
19 | private symbolResolver;
|
---|
20 | private errorRecorder?;
|
---|
21 | private annotationCache;
|
---|
22 | private shallowAnnotationCache;
|
---|
23 | private propertyCache;
|
---|
24 | private parameterCache;
|
---|
25 | private methodCache;
|
---|
26 | private staticCache;
|
---|
27 | private conversionMap;
|
---|
28 | private resolvedExternalReferences;
|
---|
29 | private injectionToken;
|
---|
30 | private opaqueToken;
|
---|
31 | ROUTES: StaticSymbol;
|
---|
32 | private ANALYZE_FOR_ENTRY_COMPONENTS;
|
---|
33 | private annotationForParentClassWithSummaryKind;
|
---|
34 | constructor(summaryResolver: SummaryResolver<StaticSymbol>, symbolResolver: StaticSymbolResolver, knownMetadataClasses?: {
|
---|
35 | name: string;
|
---|
36 | filePath: string;
|
---|
37 | ctor: any;
|
---|
38 | }[], knownMetadataFunctions?: {
|
---|
39 | name: string;
|
---|
40 | filePath: string;
|
---|
41 | fn: any;
|
---|
42 | }[], errorRecorder?: ((error: any, fileName?: string | undefined) => void) | undefined);
|
---|
43 | componentModuleUrl(typeOrFunc: StaticSymbol): string;
|
---|
44 | /**
|
---|
45 | * Invalidate the specified `symbols` on program change.
|
---|
46 | * @param symbols
|
---|
47 | */
|
---|
48 | invalidateSymbols(symbols: StaticSymbol[]): void;
|
---|
49 | resolveExternalReference(ref: o.ExternalReference, containingFile?: string): StaticSymbol;
|
---|
50 | findDeclaration(moduleUrl: string, name: string, containingFile?: string): StaticSymbol;
|
---|
51 | tryFindDeclaration(moduleUrl: string, name: string, containingFile?: string): StaticSymbol;
|
---|
52 | findSymbolDeclaration(symbol: StaticSymbol): StaticSymbol;
|
---|
53 | tryAnnotations(type: StaticSymbol): any[];
|
---|
54 | annotations(type: StaticSymbol): any[];
|
---|
55 | shallowAnnotations(type: StaticSymbol): any[];
|
---|
56 | private _annotations;
|
---|
57 | propMetadata(type: StaticSymbol): {
|
---|
58 | [key: string]: any[];
|
---|
59 | };
|
---|
60 | parameters(type: StaticSymbol): any[];
|
---|
61 | private _methodNames;
|
---|
62 | private _staticMembers;
|
---|
63 | private findParentType;
|
---|
64 | hasLifecycleHook(type: any, lcProperty: string): boolean;
|
---|
65 | guards(type: any): {
|
---|
66 | [key: string]: StaticSymbol;
|
---|
67 | };
|
---|
68 | private _registerDecoratorOrConstructor;
|
---|
69 | private _registerFunction;
|
---|
70 | private initializeConversionMap;
|
---|
71 | /**
|
---|
72 | * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
|
---|
73 | * All types passed to the StaticResolver should be pseudo-types returned by this method.
|
---|
74 | *
|
---|
75 | * @param declarationFile the absolute path of the file where the symbol is declared
|
---|
76 | * @param name the name of the type.
|
---|
77 | */
|
---|
78 | getStaticSymbol(declarationFile: string, name: string, members?: string[]): StaticSymbol;
|
---|
79 | /**
|
---|
80 | * Simplify but discard any errors
|
---|
81 | */
|
---|
82 | private trySimplify;
|
---|
83 | private getTypeMetadata;
|
---|
84 | private reportError;
|
---|
85 | private error;
|
---|
86 | }
|
---|