Expand description
JavaScript typed arrays (Uint8Array/Int8Array/…/Float64Array),
ArrayBuffer, WeakRef, and TextEncoder/TextDecoder.
A typed array is a plain object tagged @@native = "TypedArray" carrying its
kind (@@kind), its elements as a hidden @@elems array of numbers, and the
enumerable length/byteLength/BYTES_PER_ELEMENT data properties JS code
reads directly. Element indexing (ta[i] get/set) is special-cased in
builtins::get_property/set_property via elem_get/elem_set here, which
also apply each kind’s coercion (integer wrap / clamp / float).
WeakRef holds a strong reference (deref() always returns the target) —
node-js has no GC of JS objects, so this is observably correct for the
express dependency tree (object-inspect/qs/side-channel only ever deref()).
Constants§
Functions§
- construct
new Uint8Array(...)etc.ArrayBufferis a byte container with only abyteLength.- construct_
finalization_ registry - construct_
text_ decoder - construct_
text_ encoder - construct_
weakref - elem_
get ta[i]read: the element at char/indexi, orNoneifiis out of range or not an integer index.- elem_
set ta[i] = vwrite (coerced to the kind). Returns true ifiis a valid index.- finalization_
registry_ call - instance_
call - Typed-array instance methods.
- is_ctor
- The nine element kinds plus
ArrayBuffer(which carries only a byte length). - static_
call Uint8Array.from(iterable[, mapFn])/Uint8Array.of(...items).- text_
decoder_ call - text_
encoder_ call - weakref_
call