source: trip-planner-front/node_modules/@angular/compiler/src/render3/view/util.d.ts@ 571e0df

Last change on this file since 571e0df was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.7 KB
Line 
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 */
8import { ConstantPool } from '../../constant_pool';
9import { Interpolation } from '../../expression_parser/ast';
10import * as o from '../../output/output_ast';
11import { ParseSourceSpan } from '../../parse_util';
12import * as t from '../r3_ast';
13import { R3QueryMetadata } from './api';
14/** Name of the temporary to use during data binding */
15export declare const TEMPORARY_NAME = "_t";
16/** Name of the context parameter passed into a template function */
17export declare const CONTEXT_NAME = "ctx";
18/** Name of the RenderFlag passed into a template function */
19export declare const RENDER_FLAGS = "rf";
20/** The prefix reference variables */
21export declare const REFERENCE_PREFIX = "_r";
22/** The name of the implicit context reference */
23export declare const IMPLICIT_REFERENCE = "$implicit";
24/** Non bindable attribute name **/
25export declare const NON_BINDABLE_ATTR = "ngNonBindable";
26/** Name for the variable keeping track of the context returned by `ɵɵrestoreView`. */
27export declare const RESTORED_VIEW_CONTEXT_NAME = "restoredCtx";
28/**
29 * Creates an allocator for a temporary variable.
30 *
31 * A variable declaration is added to the statements the first time the allocator is invoked.
32 */
33export declare function temporaryAllocator(statements: o.Statement[], name: string): () => o.ReadVarExpr;
34export declare function unsupported(this: void | Function, feature: string): never;
35export declare function invalid<T>(this: t.Visitor, arg: o.Expression | o.Statement | t.Node): never;
36export declare function asLiteral(value: any): o.Expression;
37export declare function conditionallyCreateMapObjectLiteral(keys: {
38 [key: string]: string | string[];
39}, keepDeclared?: boolean): o.Expression | null;
40/**
41 * Remove trailing null nodes as they are implied.
42 */
43export declare function trimTrailingNulls(parameters: o.Expression[]): o.Expression[];
44export declare function getQueryPredicate(query: R3QueryMetadata, constantPool: ConstantPool): o.Expression;
45/**
46 * A representation for an object literal used during codegen of definition objects. The generic
47 * type `T` allows to reference a documented type of the generated structure, such that the
48 * property names that are set can be resolved to their documented declaration.
49 */
50export declare class DefinitionMap<T = any> {
51 values: {
52 key: string;
53 quoted: boolean;
54 value: o.Expression;
55 }[];
56 set(key: keyof T, value: o.Expression | null): void;
57 toLiteralMap(): o.LiteralMapExpr;
58}
59/**
60 * Extract a map of properties to values for a given element or template node, which can be used
61 * by the directive matching machinery.
62 *
63 * @param elOrTpl the element or template in question
64 * @return an object set up for directive matching. For attributes on the element/template, this
65 * object maps a property name to its (static) value. For any bindings, this map simply maps the
66 * property name to an empty string.
67 */
68export declare function getAttrsForDirectiveMatching(elOrTpl: t.Element | t.Template): {
69 [name: string]: string;
70};
71/** Returns a call expression to a chained instruction, e.g. `property(params[0])(params[1])`. */
72export declare function chainedInstruction(reference: o.ExternalReference, calls: o.Expression[][], span?: ParseSourceSpan | null): o.Expression;
73/**
74 * Gets the number of arguments expected to be passed to a generated instruction in the case of
75 * interpolation instructions.
76 * @param interpolation An interpolation ast
77 */
78export declare function getInterpolationArgsLength(interpolation: Interpolation): number;
Note: See TracBrowser for help on using the repository browser.