forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpander.d.ts
More file actions
30 lines (30 loc) · 808 Bytes
/
expander.d.ts
File metadata and controls
30 lines (30 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { HtmlAst } from 'angular2/src/compiler/html_ast';
/**
* Expands special forms into elements.
*
* For example,
*
* ```
* { messages.length, plural,
* =0 {zero}
* =1 {one}
* =other {more than one}
* }
* ```
*
* will be expanded into
*
* ```
* <ul [ngPlural]="messages.length">
* <template [ngPluralCase]="0"><li i18n="plural_0">zero</li></template>
* <template [ngPluralCase]="1"><li i18n="plural_1">one</li></template>
* <template [ngPluralCase]="other"><li i18n="plural_other">more than one</li></template>
* </ul>
* ```
*/
export declare function expandNodes(nodes: HtmlAst[]): ExpansionResult;
export declare class ExpansionResult {
nodes: HtmlAst[];
expanded: boolean;
constructor(nodes: HtmlAst[], expanded: boolean);
}