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 { PipeTransform } from '@angular/core';
|
9
|
/**
|
10
|
* @ngModule CommonModule
|
11
|
* @whatItDoes Generic selector that displays the string that matches the current value.
|
12
|
* @howToUse `expression | i18nSelect:mapping`
|
13
|
* @description
|
14
|
*
|
15
|
* Where `mapping` is an object that indicates the text that should be displayed
|
16
|
* for different values of the provided `expression`.
|
17
|
* If none of the keys of the mapping match the value of the `expression`, then the content
|
18
|
* of the `other` key is returned when present, otherwise an empty string is returned.
|
19
|
*
|
20
|
* ## Example
|
21
|
*
|
22
|
* {@example common/pipes/ts/i18n_pipe.ts region='I18nSelectPipeComponent'}
|
23
|
*
|
24
|
* @experimental
|
25
|
*/
|
26
|
export declare class I18nSelectPipe implements PipeTransform {
|
27
|
transform(value: string | null | undefined, mapping: {
|
28
|
[key: string]: string;
|
29
|
}): string;
|
30
|
}
|