source: trip-planner-front/node_modules/@angular/compiler/src/render3/partial/util.d.ts@ 6a80231

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

initial commit

  • Property mode set to 100644
File size: 1.9 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 * as o from '../../output/output_ast';
9import { R3DependencyMetadata } from '../r3_factory';
10/**
11 * Creates an array literal expression from the given array, mapping all values to an expression
12 * using the provided mapping function. If the array is empty or null, then null is returned.
13 *
14 * @param values The array to transfer into literal array expression.
15 * @param mapper The logic to use for creating an expression for the array's values.
16 * @returns An array literal expression representing `values`, or null if `values` is empty or
17 * is itself null.
18 */
19export declare function toOptionalLiteralArray<T>(values: T[] | null, mapper: (value: T) => o.Expression): o.LiteralArrayExpr | null;
20/**
21 * Creates an object literal expression from the given object, mapping all values to an expression
22 * using the provided mapping function. If the object has no keys, then null is returned.
23 *
24 * @param object The object to transfer into an object literal expression.
25 * @param mapper The logic to use for creating an expression for the object's values.
26 * @returns An object literal expression representing `object`, or null if `object` does not have
27 * any keys.
28 */
29export declare function toOptionalLiteralMap<T>(object: {
30 [key: string]: T;
31}, mapper: (value: T) => o.Expression): o.LiteralMapExpr | null;
32export declare function compileDependencies(deps: R3DependencyMetadata[] | 'invalid' | null): o.LiteralExpr | o.LiteralArrayExpr;
33export declare function compileDependency(dep: R3DependencyMetadata): o.LiteralMapExpr;
34/**
35 * Generate an expression that has the given `expr` wrapped in the following form:
36 *
37 * ```
38 * forwardRef(() => expr)
39 * ```
40 */
41export declare function generateForwardRef(expr: o.Expression): o.Expression;
Note: See TracBrowser for help on using the repository browser.