1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-18 05:14:21 -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 committed by GitHub
parent d7dfd4b540
commit 883abfa1bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}