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:
parent
d7dfd4b540
commit
883abfa1bf
1 changed files with 2 additions and 0 deletions
|
@ -227,6 +227,7 @@ function arrayBufferViewTypeToIndex(abView: ArrayBufferView) {
|
||||||
// Index 10 is FastBuffer.
|
// Index 10 is FastBuffer.
|
||||||
if (type === "[object BigInt64Array]") return 11;
|
if (type === "[object BigInt64Array]") return 11;
|
||||||
if (type === "[object BigUint64Array]") return 12;
|
if (type === "[object BigUint64Array]") return 12;
|
||||||
|
if (type === "[object Float16Array]") return 13;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
export class DefaultSerializer extends Serializer {
|
export class DefaultSerializer extends Serializer {
|
||||||
|
@ -276,6 +277,7 @@ function arrayBufferViewIndexToType(index: number): any {
|
||||||
if (index === 10) return Buffer;
|
if (index === 10) return Buffer;
|
||||||
if (index === 11) return BigInt64Array;
|
if (index === 11) return BigInt64Array;
|
||||||
if (index === 12) return BigUint64Array;
|
if (index === 12) return BigUint64Array;
|
||||||
|
if (index === 13) return Float16Array;
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue