Debian Codegraph @

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

raw
1 import { usize } from "./diplomat-runtime"
2
3 /**
4
5 * Thin wrapper around a vector that maps visual indices to source indices
6
7 * `map[visualIndex] = sourceIndex`
8
9 * Produced by `reorder_visual()` on {@link ICU4XBidi `ICU4XBidi`}.
10 */
11 export class ICU4XReorderedIndexMap {
12
13 /**
14
15 * Get this as a slice/array of indices
16 */
17 as_slice(): Uint32Array;
18
19 /**
20
21 * The length of this map
22 */
23 len(): usize;
24
25 /**
26
27 * Whether this map is empty
28 */
29 is_empty(): boolean;
30
31 /**
32
33 * Get element at `index`. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use `len()` to avoid out-of-bounds)
34 */
35 get(index: usize): usize;
36 }