Skip to content

Implement TypedArray objects #893

@Razican

Description

@Razican

ECMASCript feature
It would be very nice to get TypedArray objects. They are making us fail / ignore many tests in our ECMAScript conformance suite, and they shouldn't be super difficult to implement using our current builtin objects as a template.

You can find the full specification here.

Example code
This code from MDN should give the expected results:

const typedArray1 = new Int8Array(8);
typedArray1[0] = 32;

const typedArray2 = new Int8Array(typedArray1);
typedArray2[1] = 42;

console.log(typedArray1);
// expected output: Int8Array [32, 0, 0, 0, 0, 0, 0, 0]

console.log(typedArray2);
// expected output: Int8Array [32, 42, 0, 0, 0, 0, 0, 0]

Implementation tips
To implement these, we should create a new module here called typed_arrays, and a submodule for each variant. You can see an example of a built-in object implementation here.

Metadata

Metadata

Assignees

Labels

E-MediumMedium difficulty problemHacktoberfestHacktoberfest 2025 - https://hacktoberfest.digitalocean.combuiltinsPRs and Issues related to builtins/intrinsicsenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions