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 * as cdAst from '../expression_parser/ast';
|
9
|
import * as o from '../output/output_ast';
|
10
|
export declare class EventHandlerVars {
|
11
|
static event: o.ReadVarExpr;
|
12
|
}
|
13
|
export interface LocalResolver {
|
14
|
getLocal(name: string): o.Expression | null;
|
15
|
}
|
16
|
export declare class ConvertActionBindingResult {
|
17
|
stmts: o.Statement[];
|
18
|
allowDefault: o.ReadVarExpr;
|
19
|
constructor(stmts: o.Statement[], allowDefault: o.ReadVarExpr);
|
20
|
}
|
21
|
/**
|
22
|
* Converts the given expression AST into an executable output AST, assuming the expression is
|
23
|
* used in an action binding (e.g. an event handler).
|
24
|
*/
|
25
|
export declare function convertActionBinding(localResolver: LocalResolver | null, implicitReceiver: o.Expression, action: cdAst.AST, bindingId: string): ConvertActionBindingResult;
|
26
|
export interface BuiltinConverter {
|
27
|
(args: o.Expression[]): o.Expression;
|
28
|
}
|
29
|
export interface BuiltinConverterFactory {
|
30
|
createLiteralArrayConverter(argCount: number): BuiltinConverter;
|
31
|
createLiteralMapConverter(keys: {
|
32
|
key: string;
|
33
|
quoted: boolean;
|
34
|
}[]): BuiltinConverter;
|
35
|
createPipeConverter(name: string, argCount: number): BuiltinConverter;
|
36
|
}
|
37
|
export declare function convertPropertyBindingBuiltins(converterFactory: BuiltinConverterFactory, ast: cdAst.AST): cdAst.AST;
|
38
|
export declare class ConvertPropertyBindingResult {
|
39
|
stmts: o.Statement[];
|
40
|
currValExpr: o.Expression;
|
41
|
constructor(stmts: o.Statement[], currValExpr: o.Expression);
|
42
|
}
|
43
|
/**
|
44
|
* Converts the given expression AST into an executable output AST, assuming the expression
|
45
|
* is used in property binding. The expression has to be preprocessed via
|
46
|
* `convertPropertyBindingBuiltins`.
|
47
|
*/
|
48
|
export declare function convertPropertyBinding(localResolver: LocalResolver | null, implicitReceiver: o.Expression, expressionWithoutBuiltins: cdAst.AST, bindingId: string): ConvertPropertyBindingResult;
|
49
|
export declare function temporaryDeclaration(bindingId: string, temporaryNumber: number): o.Statement;
|