summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XLocaleExpander.d.ts
blob: d3f8b8ff3a6775fea85824d1884bd92c96e368f4 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { FFIError } from "./diplomat-runtime"
import { ICU4XDataProvider } from "./ICU4XDataProvider";
import { ICU4XError } from "./ICU4XError";
import { ICU4XLocale } from "./ICU4XLocale";
import { ICU4XTransformResult } from "./ICU4XTransformResult";

/**

 * A locale expander.

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

  /**

   * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`}.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new Rust documentation for `new`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  static create(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;

  /**

   * Create a new {@link ICU4XLocaleExpander `ICU4XLocaleExpander`} with extended data.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.new_extended Rust documentation for `new_extended`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  static create_extended(provider: ICU4XDataProvider): ICU4XLocaleExpander | never;

  /**

   * FFI version of `LocaleExpander::maximize()`.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.maximize Rust documentation for `maximize`} for more information.
   */
  maximize(locale: ICU4XLocale): ICU4XTransformResult;

  /**

   * FFI version of `LocaleExpander::minimize()`.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/struct.LocaleExpander.html#method.minimize Rust documentation for `minimize`} for more information.
   */
  minimize(locale: ICU4XLocale): ICU4XTransformResult;
}