Skip to content

runtime: TypedArray constructors missing BYTES_PER_ELEMENT/constructor own props + validation #4140

@proggeramlug

Description

@proggeramlug

Summary

The TypedArray constructors (Int8Array, Uint8Array, Float64Array, …) are
missing required own properties and validation. A fresh parity sweep (2026-06-02)
shows 41 built-ins/TypedArrayConstructors failures.

Evidence

  • BYTES_PER_ELEMENT not an own property — on both the constructor and its
    prototype (BYTES_PER_ELEMENT.js).
  • constructor not an own property on the prototype (constructor.js).
  • prototype descriptor value wrong (prototype.js).
  • name/length descriptor attributes wrong (name.js, length.js) —
    related to the broader descriptor-conformance issue.
  • Missing validation thrownot-typedarray-object.js: "Expected a
    TypeError to be thrown but no exception was thrown."

(Each appears once per concrete typed-array type, hence 41 across the family.)

Repro

console.log(Uint8Array.BYTES_PER_ELEMENT);                 // expect 1
console.log(Float64Array.prototype.BYTES_PER_ELEMENT);     // expect 8
console.log(Object.getOwnPropertyDescriptor(Uint8Array, 'BYTES_PER_ELEMENT'));
// expect { value:1, writable:false, enumerable:false, configurable:false }
console.log(Int8Array.prototype.constructor === Int8Array); // expect true

Suggested scope

Install per-type BYTES_PER_ELEMENT (constructor + prototype), the prototype's
constructor back-link, and the correct prototype/name/length descriptors
on each TypedArray constructor; add the constructor's spec validation throw.


Filed from the parity-gap radar, 2026-06-02 re-sweep. Cluster: 41
TypedArrayConstructors failures. Related: the builtin-descriptor issue and #4103
(TA view ctor offset/length validation).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions