summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XRegionDisplayNames.d.ts
blob: 6c0ee43d29c8b27cb1ed34f0d78ec3481f321e49 (plain)
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
import { FFIError } from "./diplomat-runtime"
import { ICU4XDataProvider } from "./ICU4XDataProvider";
import { ICU4XError } from "./ICU4XError";
import { ICU4XLocale } from "./ICU4XLocale";

/**

 * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html Rust documentation for `RegionDisplayNames`} for more information.
 */
export class ICU4XRegionDisplayNames {

  /**

   * Creates a new `RegionDisplayNames` from locale data and an options bag.

   * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.try_new Rust documentation for `try_new`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  static create(provider: ICU4XDataProvider, locale: ICU4XLocale): ICU4XRegionDisplayNames | never;

  /**

   * Returns the locale specific display name of a region. Note that the funtion returns an empty string in case the display name for a given region code is not found.

   * See the {@link https://docs.rs/icu/latest/icu/displaynames/struct.RegionDisplayNames.html#method.of Rust documentation for `of`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  of(region: string): string | never;
}