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