0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 17:34:47 -05:00

fix(ext/node): handle Float16Array in node:v8 module (#27285)

Closes https://github.com/denoland/deno/issues/26580
This commit is contained in:
Bartek Iwańczuk 2024-12-09 19:04:47 +00:00
parent ae4eeee09d
commit 3c20dac533
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -227,6 +227,7 @@ function arrayBufferViewTypeToIndex(abView: ArrayBufferView) {
// Index 10 is FastBuffer.
if (type === "[object BigInt64Array]") return 11;
if (type === "[object BigUint64Array]") return 12;
if (type === "[object Float16Array]") return 13;
return -1;
}
export class DefaultSerializer extends Serializer {
@ -276,6 +277,7 @@ function arrayBufferViewIndexToType(index: number): any {
if (index === 10) return Buffer;
if (index === 11) return BigInt64Array;
if (index === 12) return BigUint64Array;
if (index === 13) return Float16Array;
return undefined;
}