summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_common.ts
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-08-14 09:42:31 -0700
committerGitHub <noreply@github.com>2024-08-14 09:42:31 -0700
commit1f2d48cd975b719f0248e471f3b503cb01398dfb (patch)
treef9ac89ff011566aad45456e6d49e2802ce6f345b /ext/node/polyfills/_fs/_fs_common.ts
parentc765d9ad2fbd82be1b025cae3930fdfe8e30f9e2 (diff)
fix(node/fs): node:fs.read and write should accept typed arrays other than Uint8Array (#25030)
Part of #25028. Our underlying read/write operations in `io` assume the buffer is a Uint8Array, but we were passing in other typed arrays (in the case above it was `Int8Array`).
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_common.ts')
-rw-r--r--ext/node/polyfills/_fs/_fs_common.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_common.ts b/ext/node/polyfills/_fs/_fs_common.ts
index 069f9a3a1..ac0bf5a55 100644
--- a/ext/node/polyfills/_fs/_fs_common.ts
+++ b/ext/node/polyfills/_fs/_fs_common.ts
@@ -38,7 +38,7 @@ export type BinaryOptionsArgument =
export type FileOptionsArgument = Encodings | FileOptions;
export type ReadOptions = {
- buffer: Buffer | Uint8Array;
+ buffer: Buffer | ArrayBufferView;
offset: number;
length: number;
position: number | null;