source: trip-planner-front/node_modules/@angular/compiler/src/ml_parser/icu_ast_expander.d.ts

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

initial commit

  • Property mode set to 100644
File size: 1.1 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 { ParseError, ParseSourceSpan } from '../parse_util';
9import * as html from './ast';
10/**
11 * Expands special forms into elements.
12 *
13 * For example,
14 *
15 * ```
16 * { messages.length, plural,
17 * =0 {zero}
18 * =1 {one}
19 * other {more than one}
20 * }
21 * ```
22 *
23 * will be expanded into
24 *
25 * ```
26 * <ng-container [ngPlural]="messages.length">
27 * <ng-template ngPluralCase="=0">zero</ng-template>
28 * <ng-template ngPluralCase="=1">one</ng-template>
29 * <ng-template ngPluralCase="other">more than one</ng-template>
30 * </ng-container>
31 * ```
32 */
33export declare function expandNodes(nodes: html.Node[]): ExpansionResult;
34export declare class ExpansionResult {
35 nodes: html.Node[];
36 expanded: boolean;
37 errors: ParseError[];
38 constructor(nodes: html.Node[], expanded: boolean, errors: ParseError[]);
39}
40export declare class ExpansionError extends ParseError {
41 constructor(span: ParseSourceSpan, errorMsg: string);
42}
Note: See TracBrowser for help on using the repository browser.