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)
TypedArray2.Uint8ClampedArray
Provide bindings to JS typed array Uint8ClampedArray.
t
REtype elt = int;
type typed_array('a);
type t = typed_array(elt);
unsafe_get
RElet unsafe_get: (t, int) => elt;
unsafe_set
RElet unsafe_set: (t, int, elt) => unit;
buffer
RElet buffer: t => Js_typed_array2.array_buffer;
byteLength
RElet byteLength: t => int;
byteOffset
RElet byteOffset: t => int;
setArray
RElet setArray: (array(elt), t) => unit;
setArrayOffset
RElet setArrayOffset: (array(elt), int, t) => unit;
length
RElet length: t => int;
copyWithin
RElet copyWithin: (~to_: int, t) => t;
copyWithinFrom
RElet copyWithinFrom: (~to_: int, ~from: int, t) => t;
copyWithinFromRange
RElet copyWithinFromRange: (~to_: int, ~start: int, ~end_: int, t) => t;
fillInPlace
RElet fillInPlace: (elt, t) => t;
fillFromInPlace
RElet fillFromInPlace: (elt, ~from: int, t) => t;
fillRangeInPlace
RElet fillRangeInPlace: (elt, ~start: int, ~end_: int, t) => t;
reverseInPlace
RElet reverseInPlace: t => t;
sortInPlace
RElet sortInPlace: t => t;
sortInPlaceWith
RElet sortInPlaceWith: ((. elt, elt) => int, t) => t;
includes
RElet includes: (elt, t) => bool;
ES2016
indexOf
RElet indexOf: (elt, t) => int;
indexOfFrom
RElet indexOfFrom: (elt, ~from: int, t) => int;
join
RElet join: t => string;
joinWith
RElet joinWith: (string, t) => string;
lastIndexOf
RElet lastIndexOf: (elt, t) => int;
lastIndexOfFrom
RElet lastIndexOfFrom: (elt, ~from: int, t) => int;
slice
RElet slice: (~start: int, ~end_: int, t) => t;
start
is inclusive, end_
exclusive.
copy
RElet copy: t => t;
sliceFrom
RElet sliceFrom: (int, t) => t;
subarray
RElet subarray: (~start: int, ~end_: int, t) => t;
start
is inclusive, end_
exclusive.
subarrayFrom
RElet subarrayFrom: (int, t) => t;
toString
RElet toString: t => string;
toLocaleString
RElet toLocaleString: t => string;
every
RElet every: ((. elt) => bool, t) => bool;
everyi
RElet everyi: ((. elt, int) => bool, t) => bool;
filter
RElet filter: ((. elt) => bool, t) => t;
filteri
RElet filteri: ((. elt, int) => bool, t) => t;
find
RElet find: ((. elt) => bool, t) => Js.undefined(elt);
findi
RElet findi: ((. elt, int) => bool, t) => Js.undefined(elt);
findIndex
RElet findIndex: ((. elt) => bool, t) => int;
findIndexi
RElet findIndexi: ((. elt, int) => bool, t) => int;
forEach
RElet forEach: ((. elt) => unit, t) => unit;
forEachi
RElet forEachi: ((. elt, int) => unit, t) => unit;
map
RElet map: ((. elt) => 'b, t) => typed_array('b);
mapi
RElet mapi: ((. elt, int) => 'b, t) => typed_array('b);
reduce
RElet reduce: ((. 'b, elt) => 'b, 'b, t) => 'b;
reducei
RElet reducei: ((. 'b, elt, int) => 'b, 'b, t) => 'b;
reduceRight
RElet reduceRight: ((. 'b, elt) => 'b, 'b, t) => 'b;
reduceRighti
RElet reduceRighti: ((. 'b, elt, int) => 'b, 'b, t) => 'b;
some
RElet some: ((. elt) => bool, t) => bool;
somei
RElet somei: ((. elt, int) => bool, t) => bool;
_BYTES_PER_ELEMENT
RElet _BYTES_PER_ELEMENT: int;
make
RElet make: array(elt) => t;
fromBuffer
RElet fromBuffer: Js_typed_array2.array_buffer => t;
fromBufferOffset
RElet fromBufferOffset: (Js_typed_array2.array_buffer, int) => t;
Can throw an exception.
fromBufferRange
RElet fromBufferRange: (Js_typed_array2.array_buffer, ~offset: int, ~length: int) => t;
Raises Js.Exn.Error
raise Js exception.
fromLength
RElet fromLength: int => t;
Raises Js.Exn.Error
raise Js exception.
from
RElet from: Js_typed_array2.array_like(elt) => t;