From 79bf8fce50fef2c8d8758c72b1c4c3e8bfc6bef7 Mon Sep 17 00:00:00 2001 From: simpleqt <89645338+simpleqt@users.noreply.github.com> Date: Tue, 8 Sep 2026 00:42:55 +0800 Subject: [PATCH] docs(everything): rename the phantom 'options' JSDoc param to 'constraints' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fetchSafely destructures its second parameter directly ({ maxBytes, timeoutMillis }) — no 'options' identifier exists; the doc now names the destructured object consistently. --- src/everything/tools/gzip-file-as-resource.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/everything/tools/gzip-file-as-resource.ts b/src/everything/tools/gzip-file-as-resource.ts index 3dd6fdae4a..2816bf513d 100644 --- a/src/everything/tools/gzip-file-as-resource.ts +++ b/src/everything/tools/gzip-file-as-resource.ts @@ -171,9 +171,9 @@ function validateDataURI(dataUri: string): URL { * Fetches data safely from a given URL while ensuring constraints on maximum byte size and timeout duration. * * @param {URL} url The URL to fetch data from. - * @param {Object} options An object containing options for the fetch operation. - * @param {number} options.maxBytes The maximum allowed size (in bytes) of the response. If the response exceeds this size, the operation will be aborted. - * @param {number} options.timeoutMillis The timeout duration (in milliseconds) for the fetch operation. If the fetch takes longer, it will be aborted. + * @param {Object} constraints An object containing constraints for the fetch operation. + * @param {number} constraints.maxBytes The maximum allowed size (in bytes) of the response. If the response exceeds this size, the operation will be aborted. + * @param {number} constraints.timeoutMillis The timeout duration (in milliseconds) for the fetch operation. If the fetch takes longer, it will be aborted. * @return {Promise} A promise that resolves with the response as an ArrayBuffer if successful. * @throws {Error} Throws an error if the response size exceeds the defined limit, the fetch times out, or the response is otherwise invalid. */