move createTypedArray to Local

This commit is contained in:
Halil Durak
2026-02-19 10:03:04 +03:00
parent 95920bf207
commit abab10b2cc
3 changed files with 7 additions and 8 deletions

View File

@@ -75,6 +75,12 @@ pub fn newArray(self: *const Local, len: u32) js.Array {
};
}
/// Creates a new typed array. Memory is owned by JS context.
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Typed_arrays
pub fn createTypedArray(self: *const Local, comptime array_type: js.ArrayType, size: usize) js.ArrayBufferRef(array_type) {
return .init(self, size);
}
pub fn runMicrotasks(self: *const Local) void {
self.isolate.performMicrotasksCheckpoint();
}