Closed
Description
Version
23.1.0
Platform
22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000 arm64
Subsystem
node:v8
What steps will reproduce the bug?
import { serialize } from "node:v8";
const float16Data = new Float16Array([1.0, 2.5, 3.14]);
try {
const serialized = serialize(float16Data);
console.log("Serialization successful!");
console.log("Serialized data:", serialized);
} catch (error) {
console.error("Serialization failed:", error.message);
}
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
serialize
calls finishes successfuly.
What do you see instead?
const float16Data = new Float16Array([1.0, 2.5, 3.14]);
^
ReferenceError: Float16Array is not defined
at file:///Users/ib/dev/deno/index.js:3:21
Additional information
While I understand that Float16Array
is not yet supported (eg. #52416) as it requires upgrade to V8 12.4, maybe there's a chance we could agree that arrayBufferViewTypeToIndex
will return 13
for the Float16Array
?
Lines 277 to 293 in 5633c62
Thanks!
Metadata
Metadata
Assignees
Labels
No labels