ScriptWithExtensions.d.ts (2488B)
1 // generated by diplomat-tool 2 import type { CodePointRangeIterator } from "./CodePointRangeIterator" 3 import type { DataError } from "./DataError" 4 import type { DataProvider } from "./DataProvider" 5 import type { ScriptWithExtensionsBorrowed } from "./ScriptWithExtensionsBorrowed" 6 import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; 7 8 9 /** 10 * An ICU4X ScriptWithExtensions map object, capable of holding a map of codepoints to scriptextensions values 11 * 12 * See the [Rust documentation for `ScriptWithExtensions`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html) for more information. 13 */ 14 15 16 export class ScriptWithExtensions { 17 get ffiValue(): pointer; 18 19 20 /** 21 * Create a map for the `Script`/`Script_Extensions` properties, using compiled data. 22 * 23 * See the [Rust documentation for `new`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.new) for more information. 24 */ 25 static createWithProvider(provider: DataProvider): ScriptWithExtensions; 26 27 /** 28 * Get the Script property value for a code point 29 * 30 * See the [Rust documentation for `get_script_val`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_val) for more information. 31 */ 32 getScriptVal(ch: codepoint): number; 33 34 /** 35 * Check if the Script_Extensions property of the given code point covers the given script 36 * 37 * See the [Rust documentation for `has_script`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.has_script) for more information. 38 */ 39 hasScript(ch: codepoint, script: number): boolean; 40 41 /** 42 * Borrow this object for a slightly faster variant with more operations 43 * 44 * See the [Rust documentation for `as_borrowed`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensions.html#method.as_borrowed) for more information. 45 */ 46 get asBorrowed(): ScriptWithExtensionsBorrowed; 47 48 /** 49 * Get a list of ranges of code points that contain this script in their Script_Extensions values 50 * 51 * See the [Rust documentation for `get_script_extensions_ranges`](https://docs.rs/icu/latest/icu/properties/script/struct.ScriptWithExtensionsBorrowed.html#method.get_script_extensions_ranges) for more information. 52 */ 53 iterRangesForScript(script: number): CodePointRangeIterator; 54 55 constructor(); 56 }