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
  • Array
  • Array2
  • BigInt
  • Blob
  • Console
  • Date
  • Dict
  • Exn
  • File
  • Float
  • Global
  • Int
  • Json
    • Kind
  • Map
  • Math
  • Null
  • Null_undefined
  • Nullable
  • Obj
  • Option
  • Promise
  • Promise2
  • Re
  • Result
  • Set
  • String
  • String2
  • TypedArray2
    • DataView
    • Float64Array
    • Float32Array
    • Uint32Array
    • Int32Array
    • Uint16Array
    • Int16Array
    • Uint8ClampedArray
    • Uint8Array
    • Int8Array
    • ArrayBuffer
    Typed_array
    • DataView
    • Float64_array
    • Float64Array
    • Float32_array
    • Float32Array
    • Uint32Array
    • Int32_array
    • Int32Array
    • Uint16Array
    • Int16Array
    • Uint8ClampedArray
    • Uint8Array
    • Int8Array
    • S
    • ArrayBuffer
    • Type
  • Types
  • Undefined
  • WeakMap
  • WeakSet
  • API / Js / Typed_array / Int16array

    Int16Array

    elt

    RESCRIPT
    type elt = int

    typed_array

    RESCRIPT
    type typed_array< 'a, > = Js_typed_array2.Int16Array.typed_array<'a>

    t

    RESCRIPT
    type t = typed_array<elt>

    unsafe_get

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

    unsafe_set

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

    buffer

    RESCRIPT
    let buffer: t => array_buffer

    byteLength

    RESCRIPT
    let byteLength: t => int

    byteOffset

    RESCRIPT
    let byteOffset: t => int

    length

    RESCRIPT
    let length: t => int

    copyWithinFromRange

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

    slice

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

    subarray

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

    _BYTES_PER_ELEMENT

    RESCRIPT
    let _BYTES_PER_ELEMENT: int

    make

    RESCRIPT
    let make: array<elt> => t

    fromBuffer

    RESCRIPT
    let fromBuffer: array_buffer => t

    can throw

    fromBufferOffset

    RESCRIPT
    let fromBufferOffset: (array_buffer, int) => t

    raise Js.Exn.Error raise Js exception

    param offset is in bytes

    fromBufferRange

    RESCRIPT
    let fromBufferRange: (array_buffer, ~offset: int, ~length: int) => t

    raise Js.Exn.Error raises Js exception

    param offset is in bytes, length in elements

    fromLength

    RESCRIPT
    let fromLength: int => t

    from

    RESCRIPT
    let from: array_like<elt> => t
    Types and values
    • t
      elt
    • t
      typed_array
    • t
      t
    • v
      unsafe_get
    • v
      unsafe_set
    • v
      buffer
    • v
      byteLength
    • v
      byteOffset
    • v
      length
    • v
      copyWithinFromRange
    • v
      slice
    • v
      subarray
    • v
      _BYTES_PER_ELEMENT
    • v
      make
    • v
      fromBuffer
    • v
      fromBufferOffset
    • v
      fromBufferRange
    • v
      fromLength
    • v
      from

    © 2024 The ReScript Project

    Software and assets distribution powered by KeyCDN.

    About
    • Community
    • ReScript Association
    Find us on