| 1 |
import { FFIError } from "./diplomat-runtime" |
| 2 |
import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 3 |
import { ICU4XError } from "./ICU4XError"; |
| 4 |
|
| 5 |
/** |
| 6 |
|
| 7 |
* A mapper between IANA time zone identifiers and BCP-47 time zone identifiers. |
| 8 |
|
| 9 |
* This mapper supports two-way mapping, but it is optimized for the case of IANA to BCP-47. It also supports normalizing and canonicalizing the IANA strings. |
| 10 |
|
| 11 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html Rust documentation for `TimeZoneIdMapper`} for more information. |
| 12 |
*/ |
| 13 |
export class ICU4XTimeZoneIdMapper { |
| 14 |
|
| 15 |
/** |
| 16 |
|
| 17 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapper.html#method.new Rust documentation for `new`} for more information. |
| 18 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 19 |
*/ |
| 20 |
static create(provider: ICU4XDataProvider): ICU4XTimeZoneIdMapper | never; |
| 21 |
|
| 22 |
/** |
| 23 |
|
| 24 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.iana_to_bcp47 Rust documentation for `iana_to_bcp47`} for more information. |
| 25 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 26 |
*/ |
| 27 |
iana_to_bcp47(value: string): string | never; |
| 28 |
|
| 29 |
/** |
| 30 |
|
| 31 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.normalize_iana Rust documentation for `normalize_iana`} for more information. |
| 32 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 33 |
*/ |
| 34 |
normalize_iana(value: string): string | never; |
| 35 |
|
| 36 |
/** |
| 37 |
|
| 38 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.canonicalize_iana Rust documentation for `canonicalize_iana`} for more information. |
| 39 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 40 |
*/ |
| 41 |
canonicalize_iana(value: string): string | never; |
| 42 |
|
| 43 |
/** |
| 44 |
|
| 45 |
* See the {@link https://docs.rs/icu/latest/icu/timezone/struct.TimeZoneIdMapperBorrowed.html#method.find_canonical_iana_from_bcp47 Rust documentation for `find_canonical_iana_from_bcp47`} for more information. |
| 46 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 47 |
*/ |
| 48 |
find_canonical_iana_from_bcp47(value: string): string | never; |
| 49 |
} |