Source code

Revision control

Copy as Markdown

Other Tools

// generated by diplomat-tool
import type { DataError } from "./DataError"
import type { DataProvider } from "./DataProvider"
import type { Locale } from "./Locale"
import type { TransformResult } from "./TransformResult"
import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
/**
* A locale expander.
*
* See the [Rust documentation for `LocaleExpander`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html) for more information.
*/
export class LocaleExpander {
get ffiValue(): pointer;
/**
* Create a new [`LocaleExpander`] using a new_common data source.
*
* See the [Rust documentation for `new_common`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.new_common) for more information.
*/
static createCommonWithProvider(provider: DataProvider): LocaleExpander;
/**
* Create a new [`LocaleExpander`] with extended data using compiled data.
*
* See the [Rust documentation for `new_extended`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.new_extended) for more information.
*/
static createExtended(): LocaleExpander;
/**
* Create a new [`LocaleExpander`] with extended data using a particular data source.
*
* See the [Rust documentation for `new_extended`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.new_extended) for more information.
*/
static createExtendedWithProvider(provider: DataProvider): LocaleExpander;
/**
* See the [Rust documentation for `maximize`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.maximize) for more information.
*/
maximize(locale: Locale): TransformResult;
/**
* See the [Rust documentation for `minimize`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.minimize) for more information.
*/
minimize(locale: Locale): TransformResult;
/**
* See the [Rust documentation for `minimize_favor_script`](https://docs.rs/icu/latest/icu/locale/struct.LocaleExpander.html#method.minimize_favor_script) for more information.
*/
minimizeFavorScript(locale: Locale): TransformResult;
constructor();
}