| 1 |
import { u16, u32, char } from "./diplomat-runtime" |
| 2 |
import { FFIError } from "./diplomat-runtime" |
| 3 |
import { CodePointRangeIterator } from "./CodePointRangeIterator"; |
| 4 |
import { ICU4XCodePointSetData } from "./ICU4XCodePointSetData"; |
| 5 |
import { ICU4XDataProvider } from "./ICU4XDataProvider"; |
| 6 |
import { ICU4XError } from "./ICU4XError"; |
| 7 |
|
| 8 |
/** |
| 9 |
|
| 10 |
* An ICU4X Unicode Map Property object, capable of querying whether a code point (key) to obtain the Unicode property value, for a specific Unicode property. |
| 11 |
|
| 12 |
* For properties whose values fit into 16 bits. |
| 13 |
|
| 14 |
* See the {@link https://docs.rs/icu/latest/icu/properties/index.html Rust documentation for `properties`} for more information. |
| 15 |
|
| 16 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapData.html Rust documentation for `CodePointMapData`} for more information. |
| 17 |
|
| 18 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html Rust documentation for `CodePointMapDataBorrowed`} for more information. |
| 19 |
*/ |
| 20 |
export class ICU4XCodePointMapData16 { |
| 21 |
|
| 22 |
/** |
| 23 |
|
| 24 |
* Gets the value for a code point. |
| 25 |
|
| 26 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get Rust documentation for `get`} for more information. |
| 27 |
*/ |
| 28 |
get(cp: char): u16; |
| 29 |
|
| 30 |
/** |
| 31 |
|
| 32 |
* Gets the value for a code point (specified as a 32 bit integer, in UTF-32) |
| 33 |
*/ |
| 34 |
get32(cp: u32): u16; |
| 35 |
|
| 36 |
/** |
| 37 |
|
| 38 |
* Produces an iterator over ranges of code points that map to `value` |
| 39 |
|
| 40 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value Rust documentation for `iter_ranges_for_value`} for more information. |
| 41 |
*/ |
| 42 |
iter_ranges_for_value(value: u16): CodePointRangeIterator; |
| 43 |
|
| 44 |
/** |
| 45 |
|
| 46 |
* Produces an iterator over ranges of code points that do not map to `value` |
| 47 |
|
| 48 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.iter_ranges_for_value_complemented Rust documentation for `iter_ranges_for_value_complemented`} for more information. |
| 49 |
*/ |
| 50 |
iter_ranges_for_value_complemented(value: u16): CodePointRangeIterator; |
| 51 |
|
| 52 |
/** |
| 53 |
|
| 54 |
* Gets a {@link ICU4XCodePointSetData `ICU4XCodePointSetData`} representing all entries in this map that map to the given value |
| 55 |
|
| 56 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/struct.CodePointMapDataBorrowed.html#method.get_set_for_value Rust documentation for `get_set_for_value`} for more information. |
| 57 |
*/ |
| 58 |
get_set_for_value(value: u16): ICU4XCodePointSetData; |
| 59 |
|
| 60 |
/** |
| 61 |
|
| 62 |
* See the {@link https://docs.rs/icu/latest/icu/properties/maps/fn.script.html Rust documentation for `script`} for more information. |
| 63 |
* @throws {@link FFIError}<{@link ICU4XError}> |
| 64 |
*/ |
| 65 |
static load_script(provider: ICU4XDataProvider): ICU4XCodePointMapData16 | never; |
| 66 |
} |