API / Js / TypedArray_uint-16Array

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

RE
type elt = int; type typed_array('a) = Js_typed_array2.Uint16Array.typed_array('a); type t = typed_array(elt);

unsafe_get

RE
let unsafe_get: (t, int) => elt;

unsafe_set

RE
let unsafe_set: (t, int, elt) => unit;

buffer

RE
let buffer: t => Js_typed_array.array_buffer;

byteLength

RE
let byteLength: t => int;

byteOffset

RE
let byteOffset: t => int;

setArray

RE
let setArray: (array(elt), t) => unit;

setArrayOffset

RE
let setArrayOffset: (array(elt), int, t) => unit;

length

RE
let length: t => int;

copyWithin

RE
let copyWithin: (~to_: int, t) => t;

copyWithinFrom

RE
let copyWithinFrom: (~to_: int, ~from: int, t) => t;

copyWithinFromRange

RE
let copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t;

fillInPlace

RE
let fillInPlace: (elt, t) => t;

fillFromInPlace

RE
let fillFromInPlace: (elt, ~from: int, t) => t;

fillRangeInPlace

RE
let fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t;

reverseInPlace

RE
let reverseInPlace: t => t;

sortInPlace

RE
let sortInPlace: t => t;

sortInPlaceWith

RE
let sortInPlaceWith: ((. elt, elt) => int, t) => t;

includes

RE
let includes: (elt, t) => bool;

ES2016

indexOf

RE
let indexOf: (elt, t) => int;

indexOfFrom

RE
let indexOfFrom: (elt, ~from: int, t) => int;

join

RE
let join: t => string;

joinWith

RE
let joinWith: (string, t) => string;

lastIndexOf

RE
let lastIndexOf: (elt, t) => int;

lastIndexOfFrom

RE
let lastIndexOfFrom: (elt, ~from: int, t) => int;

slice

RE
let slice: (~start: int, ~end_: int, t) => t;

start is inclusive, end_ exclusive.

copy

RE
let copy: t => t;

sliceFrom

RE
let sliceFrom: (int, t) => t;

subarray

RE
let subarray: (~start: int, ~end_: int, t) => t;

start is inclusive, end_ exclusive.

subarrayFrom

RE
let subarrayFrom: (int, t) => t;

toString

RE
let toString: t => string;

toLocaleString

RE
let toLocaleString: t => string;

every

RE
let every: ((. elt) => bool, t) => bool;

everyi

RE
let everyi: ((. elt, int) => bool, t) => bool;

filter

RE
let filter: ((. elt) => bool, t) => t;

filteri

RE
let filteri: ((. elt, int) => bool, t) => t;

find

RE
let find: ((. elt) => bool, t) => Js.undefined(elt);

findi

RE
let findi: ((. elt, int) => bool, t) => Js.undefined(elt);

findIndex

RE
let findIndex: ((. elt) => bool, t) => int;

findIndexi

RE
let findIndexi: ((. elt, int) => bool, t) => int;

forEach

RE
let forEach: ((. elt) => unit, t) => unit;

forEachi

RE
let forEachi: ((. elt, int) => unit, t) => unit;

map

RE
let map: ((. elt) => 'b, t) => typed_array('b);

mapi

RE
let mapi: ((. elt, int) => 'b, t) => typed_array('b);

reduce

RE
let reduce: ((. 'b, elt) => 'b, 'b, t) => 'b;

reducei

RE
let reducei: ((. 'b, elt, int) => 'b, 'b, t) => 'b;

reduceRight

RE
let reduceRight: ((. 'b, elt) => 'b, 'b, t) => 'b;

reduceRighti

RE
let reduceRighti: ((. 'b, elt, int) => 'b, 'b, t) => 'b;

some

RE
let some: ((. elt) => bool, t) => bool;

somei

RE
let somei: ((. elt, int) => bool, t) => bool;

_BYTES_PER_ELEMENT

RE
let _BYTES_PER_ELEMENT: int;

make

RE
let make: array(elt) => t;

fromBuffer

RE
let fromBuffer: Js_typed_array.array_buffer => t;

fromBufferOffset

RE
let fromBufferOffset: (Js_typed_array.array_buffer, int) => t;

Can throw an exception.

fromBufferRange

RE
let fromBufferRange: (Js_typed_array.array_buffer, ~offset: int, ~length: int) => t;

Raises Js.Exn.Error raise Js exception.

fromLength

RE
let fromLength: int => t;

Raises Js.Exn.Error raise Js exception.

from

RE
let from: Js_typed_array.array_like(elt) => t;