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 { ParseError, ParseSourceSpan } from '../parse_util';
|
9
|
import * 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
|
*/
|
33
|
export declare function expandNodes(nodes: html.Node[]): ExpansionResult;
|
34
|
export declare class ExpansionResult {
|
35
|
nodes: html.Node[];
|
36
|
expanded: boolean;
|
37
|
errors: ParseError[];
|
38
|
constructor(nodes: html.Node[], expanded: boolean, errors: ParseError[]);
|
39
|
}
|
40
|
export declare class ExpansionError extends ParseError {
|
41
|
constructor(span: ParseSourceSpan, errorMsg: string);
|
42
|
}
|