Project

General

Profile

1
import { CompileReflector } from '../compile_reflector';
2
import * as o from '../output/output_ast';
3
import { SummaryResolver } from '../summary_resolver';
4
import { StaticSymbol } from './static_symbol';
5
import { StaticSymbolResolver } from './static_symbol_resolver';
6
/**
7
 * A static reflector implements enough of the Reflector API that is necessary to compile
8
 * templates statically.
9
 */
10
export declare class StaticReflector implements CompileReflector {
11
    private summaryResolver;
12
    private symbolResolver;
13
    private errorRecorder;
14
    private annotationCache;
15
    private propertyCache;
16
    private parameterCache;
17
    private methodCache;
18
    private conversionMap;
19
    private injectionToken;
20
    private opaqueToken;
21
    private ROUTES;
22
    private ANALYZE_FOR_ENTRY_COMPONENTS;
23
    private annotationForParentClassWithSummaryKind;
24
    private annotationNames;
25
    constructor(summaryResolver: SummaryResolver<StaticSymbol>, symbolResolver: StaticSymbolResolver, knownMetadataClasses?: {
26
        name: string;
27
        filePath: string;
28
        ctor: any;
29
    }[], knownMetadataFunctions?: {
30
        name: string;
31
        filePath: string;
32
        fn: any;
33
    }[], errorRecorder?: (error: any, fileName?: string) => void);
34
    componentModuleUrl(typeOrFunc: StaticSymbol): string;
35
    resolveExternalReference(ref: o.ExternalReference): StaticSymbol;
36
    findDeclaration(moduleUrl: string, name: string, containingFile?: string): StaticSymbol;
37
    tryFindDeclaration(moduleUrl: string, name: string): StaticSymbol;
38
    findSymbolDeclaration(symbol: StaticSymbol): StaticSymbol;
39
    annotations(type: StaticSymbol): any[];
40
    propMetadata(type: StaticSymbol): {
41
        [key: string]: any[];
42
    };
43
    parameters(type: StaticSymbol): any[];
44
    private _methodNames(type);
45
    private findParentType(type, classMetadata);
46
    hasLifecycleHook(type: any, lcProperty: string): boolean;
47
    private _registerDecoratorOrConstructor(type, ctor);
48
    private _registerFunction(type, fn);
49
    private initializeConversionMap();
50
    /**
51
     * getStaticSymbol produces a Type whose metadata is known but whose implementation is not loaded.
52
     * All types passed to the StaticResolver should be pseudo-types returned by this method.
53
     *
54
     * @param declarationFile the absolute path of the file where the symbol is declared
55
     * @param name the name of the type.
56
     */
57
    getStaticSymbol(declarationFile: string, name: string, members?: string[]): StaticSymbol;
58
    private reportError(error, context, path?);
59
    /**
60
     * Simplify but discard any errors
61
     */
62
    private trySimplify(context, value);
63
    private getTypeMetadata(type);
64
}
(11-11/22)