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 { AST } from '../../expression_parser/ast';
|
---|
9 | import { SelectorMatcher } from '../../selector';
|
---|
10 | import { BoundAttribute, BoundEvent, Element, Reference, Template, TextAttribute, Variable } from '../r3_ast';
|
---|
11 | import { BoundTarget, DirectiveMeta, Target, TargetBinder } from './t2_api';
|
---|
12 | /**
|
---|
13 | * Processes `Target`s with a given set of directives and performs a binding operation, which
|
---|
14 | * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the
|
---|
15 | * target.
|
---|
16 | */
|
---|
17 | export declare class R3TargetBinder<DirectiveT extends DirectiveMeta> implements TargetBinder<DirectiveT> {
|
---|
18 | private directiveMatcher;
|
---|
19 | constructor(directiveMatcher: SelectorMatcher<DirectiveT>);
|
---|
20 | /**
|
---|
21 | * Perform a binding operation on the given `Target` and return a `BoundTarget` which contains
|
---|
22 | * metadata about the types referenced in the template.
|
---|
23 | */
|
---|
24 | bind(target: Target): BoundTarget<DirectiveT>;
|
---|
25 | }
|
---|
26 | /**
|
---|
27 | * Metadata container for a `Target` that allows queries for specific bits of metadata.
|
---|
28 | *
|
---|
29 | * See `BoundTarget` for documentation on the individual methods.
|
---|
30 | */
|
---|
31 | export declare class R3BoundTarget<DirectiveT extends DirectiveMeta> implements BoundTarget<DirectiveT> {
|
---|
32 | readonly target: Target;
|
---|
33 | private directives;
|
---|
34 | private bindings;
|
---|
35 | private references;
|
---|
36 | private exprTargets;
|
---|
37 | private symbols;
|
---|
38 | private nestingLevel;
|
---|
39 | private templateEntities;
|
---|
40 | private usedPipes;
|
---|
41 | constructor(target: Target, directives: Map<Element | Template, DirectiveT[]>, bindings: Map<BoundAttribute | BoundEvent | TextAttribute, DirectiveT | Element | Template>, references: Map<BoundAttribute | BoundEvent | Reference | TextAttribute, {
|
---|
42 | directive: DirectiveT;
|
---|
43 | node: Element | Template;
|
---|
44 | } | Element | Template>, exprTargets: Map<AST, Reference | Variable>, symbols: Map<Reference | Variable, Template>, nestingLevel: Map<Template, number>, templateEntities: Map<Template | null, ReadonlySet<Reference | Variable>>, usedPipes: Set<string>);
|
---|
45 | getEntitiesInTemplateScope(template: Template | null): ReadonlySet<Reference | Variable>;
|
---|
46 | getDirectivesOfNode(node: Element | Template): DirectiveT[] | null;
|
---|
47 | getReferenceTarget(ref: Reference): {
|
---|
48 | directive: DirectiveT;
|
---|
49 | node: Element | Template;
|
---|
50 | } | Element | Template | null;
|
---|
51 | getConsumerOfBinding(binding: BoundAttribute | BoundEvent | TextAttribute): DirectiveT | Element | Template | null;
|
---|
52 | getExpressionTarget(expr: AST): Reference | Variable | null;
|
---|
53 | getTemplateOfSymbol(symbol: Reference | Variable): Template | null;
|
---|
54 | getNestingLevel(template: Template): number;
|
---|
55 | getUsedDirectives(): DirectiveT[];
|
---|
56 | getUsedPipes(): string[];
|
---|
57 | }
|
---|