tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

ListFormatter.d.ts (2827B)


      1 // generated by diplomat-tool
      2 import type { DataError } from "./DataError"
      3 import type { DataProvider } from "./DataProvider"
      4 import type { ListLength } from "./ListLength"
      5 import type { Locale } from "./Locale"
      6 import type { pointer, codepoint } from "./diplomat-runtime.d.ts";
      7 
      8 
      9 /**
     10 * See the [Rust documentation for `ListFormatter`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html) for more information.
     11 */
     12 
     13 
     14 export class ListFormatter {
     15    get ffiValue(): pointer;
     16 
     17 
     18    /**
     19     * Construct a new ListFormatter instance for And patterns from compiled data.
     20     *
     21     * See the [Rust documentation for `try_new_and`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and) for more information.
     22     */
     23    static createAndWithLength(locale: Locale, length: ListLength): ListFormatter;
     24 
     25    /**
     26     * Construct a new ListFormatter instance for And patterns
     27     *
     28     * See the [Rust documentation for `try_new_and`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_and) for more information.
     29     */
     30    static createAndWithLengthAndProvider(provider: DataProvider, locale: Locale, length: ListLength): ListFormatter;
     31 
     32    /**
     33     * Construct a new ListFormatter instance for And patterns from compiled data.
     34     *
     35     * See the [Rust documentation for `try_new_or`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or) for more information.
     36     */
     37    static createOrWithLength(locale: Locale, length: ListLength): ListFormatter;
     38 
     39    /**
     40     * Construct a new ListFormatter instance for And patterns
     41     *
     42     * See the [Rust documentation for `try_new_or`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_or) for more information.
     43     */
     44    static createOrWithLengthAndProvider(provider: DataProvider, locale: Locale, length: ListLength): ListFormatter;
     45 
     46    /**
     47     * Construct a new ListFormatter instance for And patterns from compiled data.
     48     *
     49     * See the [Rust documentation for `try_new_unit`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit) for more information.
     50     */
     51    static createUnitWithLength(locale: Locale, length: ListLength): ListFormatter;
     52 
     53    /**
     54     * Construct a new ListFormatter instance for And patterns
     55     *
     56     * See the [Rust documentation for `try_new_unit`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.try_new_unit) for more information.
     57     */
     58    static createUnitWithLengthAndProvider(provider: DataProvider, locale: Locale, length: ListLength): ListFormatter;
     59 
     60    /**
     61     * See the [Rust documentation for `format`](https://docs.rs/icu/latest/icu/list/struct.ListFormatter.html#method.format) for more information.
     62     */
     63    format(list: Array<string>): string;
     64 }