Quick Links
  • -Overview
  • -Language Features
  • -JS Interop
  • -Build System
Documentation
Language Manual
Reference for all language features
ReScript & React
First class bindings for ReactJS
GenType
Seamless TypeScript integration
Reanalyze
Dead Code & Termination analysis
Exploration
Packages
Explore third party libraries and bindings
Syntax Lookup
Discover all syntax constructs
APIPlaygroundBlogCommunity
  • Playground
  • Blog
  • X
  • BlueSky
  • GitHub
  • Forum
JS Module
Overview
  • JS
Submodules
  • Array2
  • Array
  • Console
  • Date
  • Dict
  • Exn
  • Float
  • Global
  • Int
  • Json
  • List
  • Math
  • NullUndefined
  • Null
  • Nullable
  • Obj
  • Option
  • Promise
  • Re
  • Result
  • String2
  • String
  • TypedArrayArrayBuffer
  • TypedArrayDataView
  • TypedArrayFloat32Array
  • TypedArrayFloat64Array
  • TypedArrayInt8Array
  • TypedArrayInt16Array
  • TypedArrayInt32Array
    • t
    • _BYTES_PER_ELEMENT
    • buffer
    • byteLength
    • byteOffset
    • copy
    • copyWithin
    • copyWithinFrom
    • copyWithinFromRange
    • create
    • every
    • everyi
    • fillFromInPlace
    • fillInPlace
    • fillRangeInPlace
    • filter
    • filteri
    • find
    • findi
    • findIndex
    • findIndexi
    • forEach
    • forEachi
    • from
    • fromBuffer
    • fromBufferOffset
    • fromBufferRange
    • fromLength
    • includes
    • indexOf
    • indexOfFrom
    • join
    • joinWith
    • lastIndexOf
    • lastIndexOfFrom
    • length
    • make
    • map
    • mapi
    • of_buffer
    • reduce
    • reducei
    • reduceRight
    • reduceRighti
    • reverseInPlace
    • setArray
    • setArrayOffset
    • slice
    • sliceFrom
    • some
    • somei
    • sortInPlace
    • sortInPlaceWith
    • subarray
    • subarrayFrom
    • toLocaleString
    • toString
    • unsafe_get
    • unsafe_set
  • TypedArrayTypeS
  • TypedArrayUint8Array
  • TypedArrayUint8ClampedArray
  • TypedArrayUint16Array
  • TypedArrayUint32Array
  • TypedArray2ArrayBuffer
  • TypedArray2DataView
  • TypedArray2Float32Array
  • TypedArray2Float64Array
  • TypedArray2Int8Array
  • TypedArray2Int16Array
  • TypedArray2Int32Array
  • TypedArray2Uint8Array
  • TypedArray2Uint8ClampedArray
  • TypedArray2Uint16Array
  • TypedArray2Uint32Array
  • TypedArray2
  • TypedArray
  • Types
  • Undefined
  • Vector
API / Js / TypedArray_int-32Array

You are currently looking at the v8.2 - v9.0 docs (Reason v3.6 syntax edition). You can find the latest API docs here.

TypedArray.Int32Array

Provide bindings to JS typed array Int32Array.

t

RES
type elt = int32 type typed_array<'a> = Js_typed_array2.Int32Array.typed_array<'a> type t = typed_array<elt>

unsafe_get

RES
let unsafe_get: (t, int) => elt

unsafe_set

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

buffer

RES
let buffer: t => Js_typed_array.array_buffer

byteLength

RES
let byteLength: t => int

byteOffset

RES
let byteOffset: t => int

setArray

RES
let setArray: (array<elt>, t) => unit

setArrayOffset

RES
let setArrayOffset: (array<elt>, int, t) => unit

length

RES
let length: t => int

copyWithin

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

copyWithinFrom

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

copyWithinFromRange

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

fillInPlace

RES
let fillInPlace: (elt, t) => t

fillFromInPlace

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

fillRangeInPlace

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

reverseInPlace

RES
let reverseInPlace: t => t

sortInPlace

RES
let sortInPlace: t => t

sortInPlaceWith

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

includes

RES
let includes: (elt, t) => bool

ES2016

indexOf

RES
let indexOf: (elt, t) => int

indexOfFrom

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

join

RES
let join: t => string

joinWith

RES
let joinWith: (string, t) => string

lastIndexOf

RES
let lastIndexOf: (elt, t) => int

lastIndexOfFrom

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

slice

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

start is inclusive, end_ exclusive.

copy

RES
let copy: t => t

sliceFrom

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

subarray

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

start is inclusive, end_ exclusive.

subarrayFrom

RES
let subarrayFrom: (int, t) => t

toString

RES
let toString: t => string

toLocaleString

RES
let toLocaleString: t => string

every

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

everyi

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

filter

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

filteri

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

find

RES
let find: ((. elt) => bool, t) => Js.undefined<elt>

findi

RES
let findi: ((. elt, int) => bool, t) => Js.undefined<elt>

findIndex

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

findIndexi

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

forEach

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

forEachi

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

map

RES
let map: ((. elt) => 'b, t) => typed_array<'b>

mapi

RES
let mapi: ((. elt, int) => 'b, t) => typed_array<'b>

reduce

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

reducei

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

reduceRight

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

reduceRighti

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

some

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

somei

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

_BYTES_PER_ELEMENT

RES
let _BYTES_PER_ELEMENT: int

make

RES
let make: array<elt> => t

fromBuffer

RES
let fromBuffer: Js_typed_array.array_buffer => t

fromBufferOffset

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

Can throw an exception.

fromBufferRange

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

Raises Js.Exn.Error raise Js exception.

fromLength

RES
let fromLength: int => t

Raises Js.Exn.Error raise Js exception.

from

RES
let from: Js_typed_array.array_like<elt> => t

create

RES
let create: array<elt> => t

of_buffer

RES
let of_buffer: Js_typed_array.array_buffer => t

© 2024 The ReScript Project

Software and assets distribution powered by KeyCDN.

About
  • Community
  • ReScript Association
Find us on