From ca5b82714845654f91859fc61365a9d5162beb46 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Mon, 22 Apr 2024 02:06:30 -0400 Subject: [PATCH] fs: fix read / readSync positional offset types This changeset fixes the types in comments to match the implementation. PR-URL: https://github.com/nodejs/node/pull/52603 Reviewed-By: Yagiz Nizipli Reviewed-By: Marco Ippolito Reviewed-By: LiviaMedeiros Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca Reviewed-By: Moshe Atlow Reviewed-By: James M Snell --- lib/fs.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 19ceb638f52b5b..2231ad745b632e 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -599,7 +599,11 @@ function openAsBlob(path, options = kEmptyObject) { * Reads file from the specified `fd` (file descriptor). * @param {number} fd * @param {Buffer | TypedArray | DataView} buffer - * @param {number} offsetOrOptions + * @param {number | { + * offset?: number; + * length?: number; + * position?: number | bigint | null; + * }} [offsetOrOptions] * @param {number} length * @param {number | bigint | null} position * @param {( @@ -692,7 +696,7 @@ ObjectDefineProperty(read, kCustomPromisifyArgsSymbol, * specified `fd` (file descriptor). * @param {number} fd * @param {Buffer | TypedArray | DataView} buffer - * @param {{ + * @param {number | { * offset?: number; * length?: number; * position?: number | bigint | null;