From 76e639c43d079f0c8630849885af714127b3eeee Mon Sep 17 00:00:00 2001 From: LiviaMedeiros Date: Sat, 30 Apr 2022 00:22:57 +0800 Subject: [PATCH] squash: declare some values as nullable in fs.js --- lib/fs.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 7b10c3d9f43302..cf0879ce56d131 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -597,7 +597,7 @@ function openSync(path, flags, mode) { * @param {Buffer | TypedArray | DataView} buffer * @param {number} offset * @param {number} length - * @param {number | bigint} position + * @param {number | bigint | null} position * @param {( * err?: Error, * bytesRead?: number, @@ -682,7 +682,7 @@ ObjectDefineProperty(read, internalUtil.customPromisifyArgs, * @param {{ * offset?: number; * length?: number; - * position?: number | bigint; + * position?: number | bigint | null; * }} [offset] * @returns {number} */ @@ -738,7 +738,7 @@ function readSync(fd, buffer, offset, length, position) { * and writes to an array of `ArrayBufferView`s. * @param {number} fd * @param {ArrayBufferView[]} buffers - * @param {number} [position] + * @param {number | null} [position] * @param {( * err?: Error, * bytesRead?: number, @@ -773,7 +773,7 @@ ObjectDefineProperty(readv, internalUtil.customPromisifyArgs, * of `ArrayBufferView`s. * @param {number} fd * @param {ArrayBufferView[]} buffers - * @param {number} [position] + * @param {number | null} [position] * @returns {number} */ function readvSync(fd, buffers, position) { @@ -796,7 +796,7 @@ function readvSync(fd, buffers, position) { * @param {Buffer | TypedArray | DataView | string | object} buffer * @param {number} [offset] * @param {number} [length] - * @param {number} [position] + * @param {number | null} [position] * @param {( * err?: Error, * bytesWritten?: number; @@ -864,7 +864,7 @@ ObjectDefineProperty(write, internalUtil.customPromisifyArgs, * @param {Buffer | TypedArray | DataView | string} buffer * @param {number} [offset] * @param {number} [length] - * @param {number} [position] + * @param {number | null} [position] * @returns {number} */ function writeSync(fd, buffer, offset, length, position) { @@ -902,7 +902,7 @@ function writeSync(fd, buffer, offset, length, position) { * specified `fd` (file descriptor). * @param {number} fd * @param {ArrayBufferView[]} buffers - * @param {number} [position] + * @param {number | null} [position] * @param {( * err?: Error, * bytesWritten?: number, @@ -943,7 +943,7 @@ ObjectDefineProperty(writev, internalUtil.customPromisifyArgs, { * to the specified `fd` (file descriptor). * @param {number} fd * @param {ArrayBufferView[]} buffers - * @param {number} [position] + * @param {number | null} [position] * @returns {number} */ function writevSync(fd, buffers, position) { @@ -1601,7 +1601,7 @@ function readlinkSync(path, options) { * Creates the link called `path` pointing to `target`. * @param {string | Buffer | URL} target * @param {string | Buffer | URL} path - * @param {string} [type_] + * @param {string | null} [type_] * @param {(err?: Error) => any} callback_ * @returns {void} */ @@ -1654,7 +1654,7 @@ function symlink(target, path, type_, callback_) { * pointing to `target`. * @param {string | Buffer | URL} target * @param {string | Buffer | URL} path - * @param {string} [type] + * @param {string | null} [type] * @returns {void} */ function symlinkSync(target, path, type) {