API / Js / TypedArray_typeS

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 type S

TODO

t

type elt; type 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;

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;

copy

let copy: t => t;

sliceFrom

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

subarray

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

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;