summaryrefslogtreecommitdiffstats
path: root/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts')
-rw-r--r--intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
new file mode 100644
index 0000000000..ef6889f2ae
--- /dev/null
+++ b/intl/icu_capi/js/package/lib/ICU4XReorderedIndexMap.d.ts
@@ -0,0 +1,30 @@
+import { usize } from "./diplomat-runtime"
+
+/**
+
+ * Thin wrapper around a vector that maps visual indices to source indices
+
+ * `map[visualIndex] = sourceIndex`
+
+ * Produced by `reorder_visual()` on {@link ICU4XBidi `ICU4XBidi`}.
+ */
+export class ICU4XReorderedIndexMap {
+
+ /**
+
+ * Get this as a slice/array of indices
+ */
+ as_slice(): Uint32Array;
+
+ /**
+
+ * The length of this map
+ */
+ len(): usize;
+
+ /**
+
+ * 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)
+ */
+ get(index: usize): usize;
+}