Debian Codegraph @

intl/icu_capi/bindings/js/ICU4XScriptWithExtensions.d.ts

raw
1 import { u16, u32 } from "./diplomat-runtime"
2 import { FFIError } from "./diplomat-runtime"
3 import { CodePointRangeIterator } from "./CodePointRangeIterator";
4 import { ICU4XDataProvider } from "./ICU4XDataProvider";
5 import { ICU4XError } from "./ICU4XError";
6 import { ICU4XScriptWithExtensionsBorrowed } from "./ICU4XScriptWithExtensionsBorrowed";
7
8 /**
9
10 * An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values
11
12 * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html Rust documentation for `ScriptWithExtensions`} for more information.
13 */
14 export class ICU4XScriptWithExtensions {
15
16 /**
17
18 * See the {@link https://docs.rs/icu/latest/icu/properties/script/fn.script_with_extensions.html Rust documentation for `script_with_extensions`} for more information.
19 * @throws {@link FFIError}<{@link ICU4XError}>
20 */
21 static create(provider: ICU4XDataProvider): ICU4XScriptWithExtensions | never;
22
23 /**
24
25 * Get the Script property value for a code point
26
27 * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val Rust documentation for `get_script_val`} for more information.
28 */
29 get_script_val(code_point: u32): u16;
30
31 /**
32
33 * Check if the Script_Extensions property of the given code point covers the given script
34
35 * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script Rust documentation for `has_script`} for more information.
36 */
37 has_script(code_point: u32, script: u16): boolean;
38
39 /**
40
41 * Borrow this object for a slightly faster variant with more operations
42
43 * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed Rust documentation for `as_borrowed`} for more information.
44 */
45 as_borrowed(): ICU4XScriptWithExtensionsBorrowed;
46
47 /**
48
49 * Get a list of ranges of code points that contain this script in their Script_Extensions values
50
51 * See the {@link https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges Rust documentation for `get_script_extensions_ranges`} for more information.
52 */
53 iter_ranges_for_script(script: u16): CodePointRangeIterator;
54 }