summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XLocaleFallbacker.d.ts
blob: 9a2ea9a4fe36def07010f36d35f507c708af431b (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
import { FFIError } from "./diplomat-runtime"
import { ICU4XDataProvider } from "./ICU4XDataProvider";
import { ICU4XError } from "./ICU4XError";
import { ICU4XLocaleFallbackConfig } from "./ICU4XLocaleFallbackConfig";
import { ICU4XLocaleFallbackerWithConfig } from "./ICU4XLocaleFallbackerWithConfig";

/**

 * An object that runs the ICU4X locale fallback algorithm.

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

  /**

   * Creates a new `ICU4XLocaleFallbacker` from a data provider.

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

  /**

   * Creates a new `ICU4XLocaleFallbacker` without data for limited functionality.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.new_without_data Rust documentation for `new_without_data`} for more information.
   */
  static create_without_data(): ICU4XLocaleFallbacker;

  /**

   * Associates this `ICU4XLocaleFallbacker` with configuration options.

   * See the {@link https://docs.rs/icu/latest/icu/locid_transform/fallback/struct.LocaleFallbacker.html#method.for_config Rust documentation for `for_config`} for more information.
   * @throws {@link FFIError}<{@link ICU4XError}>
   */
  for_config(config: ICU4XLocaleFallbackConfig): ICU4XLocaleFallbackerWithConfig | never;
}