Skip to content

Commit

Permalink
fix(ext/node): handle Float16Array in node:v8 module (#27285)
Browse files Browse the repository at this point in the history
Closes #26580
  • Loading branch information
bartlomieju authored Dec 9, 2024
1 parent d7dfd4b commit 883abfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/node/polyfills/v8.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 883abfa

Please sign in to comment.