You are currently looking at the < v8.2.0 docs (Reason v3.6 syntax edition). You can find the latest API docs here.
(These docs cover all versions between v3 to v8 and are equivalent to the old BuckleScript docs before the rebrand)
TypedArray.Uint16Array
Provide bindings to JS typed array Uint16Array.
t
type elt = int;
type typed_array('a) = Js_typed_array2.Uint16Array.typed_array('a);
type t = typed_array(elt);
unsafe_get
let unsafe_get: (t, int) => elt;
unsafe_set
let unsafe_set: (t, int, elt) => unit;
buffer
let buffer: t => Js_typed_array.array_buffer;
byteLength
let byteLength: t => int;
byteOffset
let byteOffset: t => int;
setArray
let setArray: (array(elt), t) => unit;
setArrayOffset
let setArrayOffset: (array(elt), int, t) => unit;
length
let length: t => int;
copyWithin
let copyWithin: (~to_: int, t) => t;
copyWithinFrom
let copyWithinFrom: (~to_: int, ~from: int, t) => t;
copyWithinFromRange
let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t;
fillInPlace
let fillInPlace: (elt, t) => t;
fillFromInPlace
let fillFromInPlace: (elt, ~from: int, t) => t;
fillRangeInPlace
let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t;
reverseInPlace
let reverseInPlace: t => t;
sortInPlace
let sortInPlace: t => t;
sortInPlaceWith
let sortInPlaceWith: ((. elt, elt) => int, t) => t;
includes
let includes: (elt, t) => bool;
ES2016
indexOf
let indexOf: (elt, t) => int;
indexOfFrom
let indexOfFrom: (elt, ~from: int, t) => int;
join
let join: t => string;
joinWith
let joinWith: (string, t) => string;
lastIndexOf
let lastIndexOf: (elt, t) => int;
lastIndexOfFrom
let lastIndexOfFrom: (elt, ~from: int, t) => int;
slice
let slice: (~start: int, ~end_: int, t) => t;
start
is inclusive, end_
exclusive.
copy
let copy: t => t;
sliceFrom
let sliceFrom: (int, t) => t;
subarray
let subarray: (~start: int, ~end_: int, t) => t;
start
is inclusive, end_
exclusive.
subarrayFrom
let subarrayFrom: (int, t) => t;
toString
let toString: t => string;
toLocaleString
let toLocaleString: t => string;
every
let every: ((. elt) => bool, t) => bool;
everyi
let everyi: ((. elt, int) => bool, t) => bool;
filter
let filter: ((. elt) => bool, t) => t;
filteri
let filteri: ((. elt, int) => bool, t) => t;
find
let find: ((. elt) => bool, t) => Js.undefined(elt);
findi
let findi: ((. elt, int) => bool, t) => Js.undefined(elt);
findIndex
let findIndex: ((. elt) => bool, t) => int;
findIndexi
let findIndexi: ((. elt, int) => bool, t) => int;
forEach
let forEach: ((. elt) => unit, t) => unit;
forEachi
let forEachi: ((. elt, int) => unit, t) => unit;
map
let map: ((. elt) => 'b, t) => typed_array('b);
mapi
let mapi: ((. elt, int) => 'b, t) => typed_array('b);
reduce
let reduce: ((. 'b, elt) => 'b, 'b, t) => 'b;
reducei
let reducei: ((. 'b, elt, int) => 'b, 'b, t) => 'b;
reduceRight
let reduceRight: ((. 'b, elt) => 'b, 'b, t) => 'b;
reduceRighti
let reduceRighti: ((. 'b, elt, int) => 'b, 'b, t) => 'b;
some
let some: ((. elt) => bool, t) => bool;
somei
let somei: ((. elt, int) => bool, t) => bool;
_BYTES_PER_ELEMENT
let _BYTES_PER_ELEMENT: int;
make
let make: array(elt) => t;
fromBuffer
let fromBuffer: Js_typed_array.array_buffer => t;
fromBufferOffset
let fromBufferOffset: (Js_typed_array.array_buffer, int) => t;
Can throw an exception.
fromBufferRange
let fromBufferRange: (Js_typed_array.array_buffer, ~offset: int, ~length: int) => t;
Raises Js.Exn.Error
raise Js exception.
fromLength
let fromLength: int => t;
Raises Js.Exn.Error
raise Js exception.
from
let from: Js_typed_array.array_like(elt) => t;