Module TypedArray2.Uint8Array

type elt = int;
type typed_array('a);
type t = typed_array(elt);
let unsafe_get: t => int => elt;
let unsafe_set: t => int => elt => unit;
let buffer: t => array_buffer;
let byteLength: t => int;
let byteOffset: t => int;
let setArray: t => array(elt) => unit;
let setArrayOffset: t => array(elt) => int => unit;
let length: t => int;
let copyWithin: t => to_:int => t;
let copyWithinFrom: t => to_:int => from:int => t;
let copyWithinFromRange: t => to_:int => start:int => end_:int => t;
let fillInPlace: t => elt => t;
let fillFromInPlace: t => elt => from:int => t;
let fillRangeInPlace: t => elt => start:int => end_:int => t;
let reverseInPlace: t => t;
let sortInPlace: t => t;
let sortInPlaceWith: t => Js__.Js_internal.Fn.arity2((elt => elt => int)) => t;
let includes: t => elt => bool;
let indexOf: t => elt => int;
let indexOfFrom: t => elt => from:int => int;
let join: t => string;
let joinWith: t => string => string;
let lastIndexOf: t => elt => int;
let lastIndexOfFrom: t => elt => from:int => int;
let slice: t => start:int => end_:int => t;

start is inclusive, end_ exclusive

let copy: t => t;
let sliceFrom: t => int => t;
let subarray: t => start:int => end_:int => t;

start is inclusive, end_ exclusive

let subarrayFrom: t => int => t;
let toString: t => string;
let toLocaleString: t => string;
let every: t => Js__.Js_internal.Fn.arity1((elt => bool)) => bool;
let everyi: t => Js__.Js_internal.Fn.arity2((elt => int => bool)) => bool;
let filter: t => Js__.Js_internal.Fn.arity1((elt => bool)) => t;
let filteri: t => Js__.Js_internal.Fn.arity2((elt => int => bool)) => t;
let find: t => Js__.Js_internal.Fn.arity1((elt => bool)) => Js__.Js_internal.undefined(elt);
let findi: t => Js__.Js_internal.Fn.arity2((elt => int => bool)) => Js__.Js_internal.undefined(elt);
let findIndex: t => Js__.Js_internal.Fn.arity1((elt => bool)) => int;
let findIndexi: t => Js__.Js_internal.Fn.arity2((elt => int => bool)) => int;
let forEach: t => Js__.Js_internal.Fn.arity1((elt => unit)) => unit;
let forEachi: t => Js__.Js_internal.Fn.arity2((elt => int => unit)) => unit;
let map: t => Js__.Js_internal.Fn.arity1((elt => 'b)) => typed_array('b);
let mapi: t => Js__.Js_internal.Fn.arity2((elt => int => 'b)) => typed_array('b);
let reduce: t => Js__.Js_internal.Fn.arity2(('b => elt => 'b)) => 'b => 'b;
let reducei: t => Js__.Js_internal.Fn.arity3(('b => elt => int => 'b)) => 'b => 'b;
let reduceRight: t => Js__.Js_internal.Fn.arity2(('b => elt => 'b)) => 'b => 'b;
let reduceRighti: t => Js__.Js_internal.Fn.arity3(('b => elt => int => 'b)) => 'b => 'b;
let some: t => Js__.Js_internal.Fn.arity1((elt => bool)) => bool;
let somei: t => Js__.Js_internal.Fn.arity2((elt => int => bool)) => bool;
let _BYTES_PER_ELEMENT: int;
let make: array(elt) => t;
let fromBuffer: array_buffer => t;

can throw

let fromBufferOffset: array_buffer => int => t;
  • parameter offset

    is in bytes

let fromBufferRange: array_buffer => offset:int => length:int => t;
  • parameter offset

    is in bytes, length in elements

let fromLength: int => t;
let from: array_like(elt) => t;