diff options
author | Satya Rohith <me@satyarohith.com> | 2021-04-28 19:38:51 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-28 10:08:51 -0400 |
commit | 2bd087ab1b2c2047b1681b8bb369a1f8acf30019 (patch) | |
tree | 5a8cc8fdb5956e9396416dbe473440c449161c24 | |
parent | 8c6f97719215815eae63cfb7cdcb5def27756a3a (diff) |
chore: upgrade dprint plugins (#10397)
-rw-r--r-- | .dprintrc.json | 6 | ||||
-rw-r--r-- | Cargo.lock | 33 | ||||
-rw-r--r-- | cli/Cargo.toml | 6 | ||||
-rw-r--r-- | cli/tests/type_headers_deno_types.ts | 4 | ||||
-rw-r--r-- | core/error.js | 4 | ||||
-rw-r--r-- | op_crates/fetch/11_streams.js | 486 | ||||
-rw-r--r-- | op_crates/fetch/20_headers.js | 20 | ||||
-rw-r--r-- | op_crates/fetch/21_formdata.js | 36 | ||||
-rw-r--r-- | op_crates/fetch/22_body.js | 6 | ||||
-rw-r--r-- | op_crates/fetch/22_http_client.js | 2 | ||||
-rw-r--r-- | op_crates/fetch/23_request.js | 16 | ||||
-rw-r--r-- | op_crates/fetch/23_response.js | 10 | ||||
-rw-r--r-- | op_crates/fetch/26_fetch.js | 20 | ||||
-rw-r--r-- | op_crates/file/01_file.js | 14 | ||||
-rw-r--r-- | op_crates/file/02_filereader.js | 4 | ||||
-rw-r--r-- | op_crates/file/03_blob_url.js | 4 | ||||
-rw-r--r-- | op_crates/url/00_url.js | 2 | ||||
-rw-r--r-- | op_crates/web/00_infra.js | 2 | ||||
-rw-r--r-- | op_crates/web/01_mimesniff.js | 6 | ||||
-rw-r--r-- | op_crates/web/08_text_encoding.js | 4 | ||||
-rw-r--r-- | runtime/js/40_permissions.js | 20 | ||||
-rw-r--r-- | tools/util.js | 4 |
22 files changed, 349 insertions, 360 deletions
diff --git a/.dprintrc.json b/.dprintrc.json index 934707c8d..340693e0d 100644 --- a/.dprintrc.json +++ b/.dprintrc.json @@ -35,8 +35,8 @@ "tools/wpt/manifest.json" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.44.0.wasm", - "https://plugins.dprint.dev/json-0.10.1.wasm", - "https://plugins.dprint.dev/markdown-0.7.0.wasm" + "https://plugins.dprint.dev/typescript-0.44.2.wasm", + "https://plugins.dprint.dev/json-0.10.2.wasm", + "https://plugins.dprint.dev/markdown-0.7.1.wasm" ] } diff --git a/Cargo.lock b/Cargo.lock index 8535ea602..86a873675 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -823,20 +823,9 @@ dependencies = [ [[package]] name = "dprint-core" -version = "0.35.3" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bd44f40b1881477837edc7112695d4b174f058c36c1cbc4c50f8d0482e2ac8" -dependencies = [ - "bumpalo", - "fnv", - "serde", -] - -[[package]] -name = "dprint-core" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1573a8cdbb2fce7f180099a74a0252288a13d7169a9dd43f0f0ff9448a1b1f4e" +checksum = "a9eef318dc38909f86fa9723ae9b2fd564554bd8115acbf6f67b89bb9d4101da" dependencies = [ "bumpalo", "fnv", @@ -845,22 +834,22 @@ dependencies = [ [[package]] name = "dprint-plugin-json" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "192d9caba72e0955a19026d139a4e412f9be3b0ba0712f1f584f2cf6e391f472" +checksum = "7c68efe8956dface56c5a37120711d076a03c8be02617010d53afd00e46f445d" dependencies = [ - "dprint-core 0.35.3", + "dprint-core", "jsonc-parser", "serde", ] [[package]] name = "dprint-plugin-markdown" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b08578cbf2afef06f8144db2be7a50a9bcf948a7ec7eae42e936386534af82" +checksum = "03143dc4349c85a344418d64d70e9d6cd34cadf6cc720b11f8e85a63f0448916" dependencies = [ - "dprint-core 0.35.3", + "dprint-core", "pulldown-cmark", "regex", "serde", @@ -868,11 +857,11 @@ dependencies = [ [[package]] name = "dprint-plugin-typescript" -version = "0.44.1" +version = "0.44.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8008a8a2abd9c476e942bf27ab80719aaeb2cce24eca6815b204fabf7acf7e6" +checksum = "a39c58ac72b4233e4dcbac562e9311e85730b457b24c3980d72d762cc76569b4" dependencies = [ - "dprint-core 0.37.0", + "dprint-core", "dprint-swc-ecma-ast-view 0.15.0", "fnv", "serde", diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 97b698f42..707c3ec6e 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -41,9 +41,9 @@ byteorder = "1.4.3" clap = "2.33.3" data-url = "0.1.0" dissimilar = "1.0.2" -dprint-plugin-json = "0.10.1" -dprint-plugin-markdown = "0.7.0" -dprint-plugin-typescript = "0.44.0" +dprint-plugin-json = "0.10.2" +dprint-plugin-markdown = "0.7.1" +dprint-plugin-typescript = "0.44.2" encoding_rs = "0.8.28" env_logger = "0.8.3" fancy-regex = "0.5.0" diff --git a/cli/tests/type_headers_deno_types.ts b/cli/tests/type_headers_deno_types.ts index 7e5438cdb..92391c666 100644 --- a/cli/tests/type_headers_deno_types.ts +++ b/cli/tests/type_headers_deno_types.ts @@ -2,10 +2,10 @@ * Following import uses two distinct ways to provide types: * - X-TypeScript-Types headers * - @deno-types directive - * + * * Because "@deno-types" directive must be placed by user explicitly it * should have higher precedence than type header. - * + * * This is verified by providing conflicting type declaration * depending on a way. There should be no TS error, otherwise * it means that wrong type declarations are used (from X-TypeScript-Types) diff --git a/core/error.js b/core/error.js index b47e5d881..cf1bc8b0a 100644 --- a/core/error.js +++ b/core/error.js @@ -178,7 +178,7 @@ /** * Returns a function that can be used as `Error.prepareStackTrace`. - * + * * This function accepts an optional argument, a function that performs * source mapping. It is not required to pass this argument, but * in such case only JavaScript sources will have proper position in @@ -191,7 +191,7 @@ * fileName: string, * lineNumber: number, * columnNumber: number - * }} sourceMappingFn + * }} sourceMappingFn */ function createPrepareStackTrace(sourceMappingFn) { return function prepareStackTrace( diff --git a/op_crates/fetch/11_streams.js b/op_crates/fetch/11_streams.js index 5ddb1902a..8bbf34898 100644 --- a/op_crates/fetch/11_streams.js +++ b/op_crates/fetch/11_streams.js @@ -15,8 +15,8 @@ } /** - * @param {unknown} cond - * @param {string=} msg + * @param {unknown} cond + * @param {string=} msg * @returns {asserts cond} */ function assert(cond, msg = "Assertion failed.") { @@ -75,8 +75,8 @@ } /** - * @param {(...args: any[]) => any} fn - * @param {boolean} enforcePromise + * @param {(...args: any[]) => any} fn + * @param {boolean} enforcePromise * @returns {(...args: any[]) => any} */ function reflectApply(fn, enforcePromise) { @@ -98,7 +98,7 @@ /** * @template I * @template O - * @param {Transformer<I, O>} transformer + * @param {Transformer<I, O>} transformer * @returns {Transformer<I, O>} */ function convertTransformer(transformer) { @@ -126,7 +126,7 @@ /** * @template W - * @param {UnderlyingSink<W>} underlyingSink + * @param {UnderlyingSink<W>} underlyingSink * @returns {UnderlyingSink<W>} */ function convertUnderlyingSink(underlyingSink) { @@ -154,7 +154,7 @@ /** * @template R - * @param {UnderlyingSource<R>} underlyingSource + * @param {UnderlyingSource<R>} underlyingSource * @returns {UnderlyingSource<R>} */ function convertUnderlyingSource(underlyingSource) { @@ -194,9 +194,9 @@ * @template T * @template TResult1 * @template TResult2 - * @param {Promise<T>} promise - * @param {(value: T) => TResult1 | PromiseLike<TResult1>} onFulfilled - * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} onRejected + * @param {Promise<T>} promise + * @param {(value: T) => TResult1 | PromiseLike<TResult1>} onFulfilled + * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} onRejected * @returns {Promise<TResult1 | TResult2>} */ function performPromiseThen(promise, onFulfilled, onRejected) { @@ -205,7 +205,7 @@ /** * @template T - * @param {T | PromiseLike<T>} value + * @param {T | PromiseLike<T>} value * @returns {Promise<T>} */ function resolvePromiseWith(value) { @@ -230,9 +230,9 @@ * @template T * @template TResult1 * @template TResult2 - * @param {Promise<T>} promise - * @param {(value: T) => TResult1 | PromiseLike<TResult1>} fulfillmentHandler - * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} rejectionHandler + * @param {Promise<T>} promise + * @param {(value: T) => TResult1 | PromiseLike<TResult1>} fulfillmentHandler + * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} rejectionHandler * @returns {Promise<TResult1 | TResult2>} */ function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { @@ -242,8 +242,8 @@ /** * @template T * @template TResult - * @param {Promise<T>} promise - * @param {(value: T) => TResult | PromiseLike<TResult>} onFulfilled + * @param {Promise<T>} promise + * @param {(value: T) => TResult | PromiseLike<TResult>} onFulfilled * @returns {void} */ function uponFulfillment(promise, onFulfilled) { @@ -253,8 +253,8 @@ /** * @template T * @template TResult - * @param {Promise<T>} promise - * @param {(value: T) => TResult | PromiseLike<TResult>} onRejected + * @param {Promise<T>} promise + * @param {(value: T) => TResult | PromiseLike<TResult>} onRejected * @returns {void} */ function uponRejection(promise, onRejected) { @@ -265,9 +265,9 @@ * @template T * @template TResult1 * @template TResult2 - * @param {Promise<T>} promise - * @param {(value: T) => TResult1 | PromiseLike<TResult1>} onFulfilled - * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} onRejected + * @param {Promise<T>} promise + * @param {(value: T) => TResult1 | PromiseLike<TResult1>} onFulfilled + * @param {(reason: any) => TResult2 | PromiseLike<TResult2>=} onRejected * @returns {void} */ function uponPromise(promise, onFulfilled, onRejected) { @@ -289,7 +289,7 @@ } /** - * @param {ArrayBufferLike} O + * @param {ArrayBufferLike} O * @returns {ArrayBufferLike} */ function transferArrayBuffer(O) { @@ -351,7 +351,7 @@ /** * @template R - * @param {ReadableStream<R>} stream + * @param {ReadableStream<R>} stream * @returns {ReadableStreamDefaultReader<R>} */ function acquireReadableStreamDefaultReader(stream) { @@ -360,7 +360,7 @@ /** * @template W - * @param {WritableStream<W>} stream + * @param {WritableStream<W>} stream * @returns {WritableStreamDefaultWriter<W>} */ function acquireWritableStreamDefaultWriter(stream) { @@ -369,11 +369,11 @@ /** * @template R - * @param {() => void} startAlgorithm - * @param {() => Promise<void>} pullAlgorithm - * @param {(reason: any) => Promise<void>} cancelAlgorithm - * @param {number=} highWaterMark - * @param {((chunk: R) => number)=} sizeAlgorithm + * @param {() => void} startAlgorithm + * @param {() => Promise<void>} pullAlgorithm + * @param {(reason: any) => Promise<void>} cancelAlgorithm + * @param {number=} highWaterMark + * @param {((chunk: R) => number)=} sizeAlgorithm * @returns {ReadableStream<R>} */ function createReadableStream( @@ -402,12 +402,12 @@ /** * @template W - * @param {(controller: WritableStreamDefaultController<W>) => Promise<void>} startAlgorithm - * @param {(chunk: W) => Promise<void>} writeAlgorithm - * @param {() => Promise<void>} closeAlgorithm - * @param {(reason: any) => Promise<void>} abortAlgorithm - * @param {number} highWaterMark - * @param {(chunk: W) => number} sizeAlgorithm + * @param {(controller: WritableStreamDefaultController<W>) => Promise<void>} startAlgorithm + * @param {(chunk: W) => Promise<void>} writeAlgorithm + * @param {() => Promise<void>} closeAlgorithm + * @param {(reason: any) => Promise<void>} abortAlgorithm + * @param {number} highWaterMark + * @param {(chunk: W) => number} sizeAlgorithm * @returns {WritableStream<W>} */ function createWritableStream( @@ -471,8 +471,8 @@ } /** - * @param {QueuingStrategy} strategy - * @param {number} defaultHWM + * @param {QueuingStrategy} strategy + * @param {number} defaultHWM */ function extractHighWaterMark(strategy, defaultHWM) { if (!("highWaterMark" in strategy)) { @@ -489,7 +489,7 @@ /** * @template T - * @param {QueuingStrategy<T>} strategy + * @param {QueuingStrategy<T>} strategy * @return {(chunk: T) => number} */ function extractSizeAlgorithm(strategy) { @@ -502,7 +502,7 @@ } /** - * @param {ReadableStream} stream + * @param {ReadableStream} stream * @returns {void} */ function initializeReadableStream(stream) { @@ -514,12 +514,12 @@ /** * @template I * @template O - * @param {TransformStream<I, O>} stream - * @param {Deferred<void>} startPromise - * @param {number} writableHighWaterMark - * @param {(chunk: I) => number} writableSizeAlgorithm - * @param {number} readableHighWaterMark - * @param {(chunk: O) => number} readableSizeAlgorithm + * @param {TransformStream<I, O>} stream + * @param {Deferred<void>} startPromise + * @param {number} writableHighWaterMark + * @param {(chunk: I) => number} writableSizeAlgorithm + * @param {number} readableHighWaterMark + * @param {(chunk: O) => number} readableSizeAlgorithm */ function initializeTransformStream( stream, @@ -588,7 +588,7 @@ } /** - * @param {unknown} v + * @param {unknown} v * @returns {v is number} */ function isNonNegativeNumber(v) { @@ -605,7 +605,7 @@ } /** - * @param {unknown} value + * @param {unknown} value * @returns {value is ReadableStream} */ function isReadableStream(value) { @@ -625,7 +625,7 @@ } /** - * @param {unknown} value + * @param {unknown} value * @returns {value is ReadableStreamDefaultReader} */ function isReadableStreamDefaultReader(value) { @@ -634,7 +634,7 @@ } /** - * @param {ReadableStream} stream + * @param {ReadableStream} stream * @returns {boolean} */ function isReadableStreamDisturbed(stream) { @@ -643,7 +643,7 @@ } /** - * @param {unknown} value + * @param {unknown} value * @returns {value is WritableStream} */ function isWritableStream(value) { @@ -652,7 +652,7 @@ } /** - * @param {WritableStream} stream + * @param {WritableStream} stream * @returns {boolean} */ function isWritableStreamLocked(stream) { @@ -675,7 +675,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerCallPullIfNeeded(controller) { @@ -708,7 +708,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerClearAlgorithms(controller) { @@ -717,8 +717,8 @@ } /** - * @param {ReadableByteStreamController} controller - * @param {any} e + * @param {ReadableByteStreamController} controller + * @param {any} e */ function readableByteStreamControllerError(controller, e) { /** @type {ReadableStream<ArrayBuffer>} */ @@ -733,7 +733,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerClose(controller) { @@ -752,8 +752,8 @@ } /** - * @param {ReadableByteStreamController} controller - * @param {ArrayBufferView} chunk + * @param {ReadableByteStreamController} controller + * @param {ArrayBufferView} chunk */ function readableByteStreamControllerEnqueue(controller, chunk) { /** @type {ReadableStream<ArrayBuffer>} */ @@ -798,10 +798,10 @@ } /** - * @param {ReadableByteStreamController} controller - * @param {ArrayBufferLike} buffer - * @param {number} byteOffset - * @param {number} byteLength + * @param {ReadableByteStreamController} controller + * @param {ArrayBufferLike} buffer + * @param {number} byteOffset + * @param {number} byteLength * @returns {void} */ function readableByteStreamControllerEnqueueChunkToQueue( @@ -815,7 +815,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {number | null} */ function readableByteStreamControllerGetDesiredSize(controller) { @@ -830,7 +830,7 @@ } /** - * @param {{ [_queue]: any[], [_queueTotalSize]: number }} container + * @param {{ [_queue]: any[], [_queueTotalSize]: number }} container * @returns {void} */ function resetQueue(container) { @@ -839,7 +839,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {void} */ function readableByteStreamControllerHandleQueueDrain(controller) { @@ -855,7 +855,7 @@ } /** - * @param {ReadableByteStreamController} controller + * @param {ReadableByteStreamController} controller * @returns {boolean} */ function readableByteStreamControllerShouldCallPull(controller) { @@ -883,7 +883,7 @@ /** * @template R - * @param {ReadableStream<R>} stream + * @param {ReadableStream<R>} stream * @param {ReadRequest<R>} readRequest * @returns {void} */ @@ -895,8 +895,8 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {any=} reason + * @param {ReadableStream<R>} stream + * @param {any=} reason * @returns {Promise<void>} */ function readableStreamCancel(stream, reason) { @@ -915,7 +915,7 @@ /** * @template R - * @param {ReadableStream<R>} stream + * @param {ReadableStream<R>} stream * @returns {void} */ function readableStreamClose(stream) { @@ -967,7 +967,7 @@ } /** - * @param {ReadableStreamDefaultController<any>} controller + * @param {ReadableStreamDefaultController<any>} controller * @returns {boolean} */ function readableStreamDefaultControllerCanCloseOrEnqueue(controller) { @@ -1003,8 +1003,8 @@ /** * @template R - * @param {ReadableStreamDefaultController<R>} controller - * @param {R} chunk + * @param {ReadableStreamDefaultController<R>} controller + * @param {R} chunk * @returns {void} */ function readableStreamDefaultControllerEnqueue(controller, chunk) { @@ -1039,8 +1039,8 @@ } /** - * @param {ReadableStreamDefaultController<any>} controller - * @param {any} e + * @param {ReadableStreamDefaultController<any>} controller + * @param {any} e */ function readableStreamDefaultControllerError(controller, e) { const stream = controller[_stream]; @@ -1053,7 +1053,7 @@ } /** - * @param {ReadableStreamDefaultController<any>} controller + * @param {ReadableStreamDefaultController<any>} controller * @returns {number | null} */ function readableStreamDefaultControllerGetDesiredSize(controller) { @@ -1077,7 +1077,7 @@ } /** - * @param {ReadableStreamDefaultController<any>} controller + * @param {ReadableStreamDefaultController<any>} controller * @returns {boolean} */ function readableStreamDefaultcontrollerShouldCallPull(controller) { @@ -1128,8 +1128,8 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {any} e + * @param {ReadableStream<R>} stream + * @param {any} e */ function readableStreamError(stream, e) { assert(stream[_state] === "readable"); @@ -1157,9 +1157,9 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {R} chunk - * @param {boolean} done + * @param {ReadableStream<R>} stream + * @param {R} chunk + * @param {boolean} done */ function readableStreamFulfillReadRequest(stream, chunk, done) { assert(readableStreamHasDefaultReader(stream) === true); @@ -1176,7 +1176,7 @@ } /** - * @param {ReadableStream} stream + * @param {ReadableStream} stream * @return {number} */ function readableStreamGetNumReadRequests(stream) { @@ -1201,12 +1201,12 @@ /** * @template T - * @param {ReadableStream<T>} source - * @param {WritableStream<T>} dest - * @param {boolean} preventClose - * @param {boolean} preventAbort - * @param {boolean} preventCancel - * @param {AbortSignal=} signal + * @param {ReadableStream<T>} source + * @param {WritableStream<T>} dest + * @param {boolean} preventClose + * @param {boolean} preventAbort + * @param {boolean} preventCancel + * @param {AbortSignal=} signal * @returns {Promise<void>} */ function readableStreamPipeTo( @@ -1388,9 +1388,9 @@ } /** - * @param {ReadableStream | WritableStream} stream - * @param {Promise<any>} promise - * @param {(e: any) => void} action + * @param {ReadableStream | WritableStream} stream + * @param {Promise<any>} promise + * @param {(e: any) => void} action */ function isOrBecomesErrored(stream, promise, action) { if (stream[_state] === "errored") { @@ -1401,9 +1401,9 @@ } /** - * @param {ReadableStream} stream - * @param {Promise<any>} promise - * @param {() => void} action + * @param {ReadableStream} stream + * @param {Promise<any>} promise + * @param {() => void} action */ function isOrBecomesClosed(stream, promise, action) { if (stream[_state] === "closed") { @@ -1414,9 +1414,9 @@ } /** - * @param {() => Promise<void[] | void>} action - * @param {boolean=} originalIsError - * @param {any=} originalError + * @param {() => Promise<void[] | void>} action + * @param {boolean=} originalIsError + * @param {any=} originalError */ function shutdownWithAction(action, originalIsError, originalError) { function doTheRest() { @@ -1443,8 +1443,8 @@ } /** - * @param {boolean=} isError - * @param {any=} error + * @param {boolean=} isError + * @param {any=} error */ function shutdown(isError, error) { if (shuttingDown) { @@ -1465,8 +1465,8 @@ } /** - * @param {boolean=} isError - * @param {any=} error + * @param {boolean=} isError + * @param {any=} error */ function finalize(isError, error) { writableStreamDefaultWriterRelease(writer); @@ -1484,8 +1484,8 @@ } /** - * @param {ReadableStreamGenericReader<any>} reader - * @param {any} reason + * @param {ReadableStreamGenericReader<any>} reader + * @param {any} reason * @returns {Promise<void>} */ function readableStreamReaderGenericCancel(reader, reason) { @@ -1496,8 +1496,8 @@ /** * @template R - * @param {ReadableStreamDefaultReader<R>} reader - * @param {ReadableStream<R>} stream + * @param {ReadableStreamDefaultReader<R>} reader + * @param {ReadableStream<R>} stream */ function readableStreamReaderGenericInitialize(reader, stream) { reader[_stream] = stream; @@ -1517,7 +1517,7 @@ /** * @template R - * @param {ReadableStreamGenericReader<R>} reader + * @param {ReadableStreamGenericReader<R>} reader */ function readableStreamReaderGenericRelease(reader) { assert(reader[_stream] !== undefined); @@ -1543,8 +1543,8 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {boolean} cloneForBranch2 + * @param {ReadableStream<R>} stream + * @param {boolean} cloneForBranch2 * @returns {[ReadableStream<R>, ReadableStream<R>]} */ function readableStreamTee(stream, cloneForBranch2) { @@ -1688,13 +1688,13 @@ } /** - * @param {ReadableStream<ArrayBuffer>} stream - * @param {ReadableByteStreamController} controller - * @param {() => void} startAlgorithm - * @param {() => Promise<void>} pullAlgorithm - * @param {(reason: any) => Promise<void>} cancelAlgorithm - * @param {number} highWaterMark - * @param {number | undefined} autoAllocateChunkSize + * @param {ReadableStream<ArrayBuffer>} stream + * @param {ReadableByteStreamController} controller + * @param {() => void} startAlgorithm + * @param {() => Promise<void>} pullAlgorithm + * @param {(reason: any) => Promise<void>} cancelAlgorithm + * @param {number} highWaterMark + * @param {number | undefined} autoAllocateChunkSize */ function setUpReadableByteStreamController( stream, @@ -1739,10 +1739,10 @@ } /** - * @param {ReadableStream<ArrayBuffer>} stream - * @param {UnderlyingSource<ArrayBuffer>} underlyingSource - * @param {UnderlyingSource<ArrayBuffer>} underlyingSourceDict - * @param {number} highWaterMark + * @param {ReadableStream<ArrayBuffer>} stream + * @param {UnderlyingSource<ArrayBuffer>} underlyingSource + * @param {UnderlyingSource<ArrayBuffer>} underlyingSourceDict + * @param {number} highWaterMark */ function setUpReadableByteStreamControllerFromUnderlyingSource( stream, @@ -1785,13 +1785,13 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {ReadableStreamDefaultController<R>} controller - * @param {(controller: ReadableStreamDefaultController<R>) => void | Promise<void>} startAlgorithm - * @param {(controller: ReadableStreamDefaultController<R>) => Promise<void>} pullAlgorithm - * @param {(reason: any) => Promise<void>} cancelAlgorithm - * @param {number} highWaterMark - * @param {(chunk: R) => number} sizeAlgorithm + * @param {ReadableStream<R>} stream + * @param {ReadableStreamDefaultController<R>} controller + * @param {(controller: ReadableStreamDefaultController<R>) => void | Promise<void>} startAlgorithm + * @param {(controller: ReadableStreamDefaultController<R>) => Promise<void>} pullAlgorithm + * @param {(reason: any) => Promise<void>} cancelAlgorithm + * @param {number} highWaterMark + * @param {(chunk: R) => number} sizeAlgorithm */ function setUpReadableStreamDefaultController( stream, @@ -1826,11 +1826,11 @@ /** * @template R - * @param {ReadableStream<R>} stream - * @param {UnderlyingSource<R>} underlyingSource - * @param {UnderlyingSource<R>} underlyingSourceDict - * @param {number} highWaterMark - * @param {(chunk: R) => number} sizeAlgorithm + * @param {ReadableStream<R>} stream + * @param {UnderlyingSource<R>} underlyingSource + * @param {UnderlyingSource<R>} underlyingSourceDict + * @param {number} highWaterMark + * @param {(chunk: R) => number} sizeAlgorithm */ function setUpReadableStreamDefaultControllerFromUnderlyingSource( stream, @@ -1871,8 +1871,8 @@ /** * @template R - * @param {ReadableStreamDefaultReader<R>} reader - * @param {ReadableStream<R>} stream + * @param {ReadableStreamDefaultReader<R>} reader + * @param {ReadableStream<R>} stream */ function setUpReadableStreamDefaultReader(reader, stream) { if (isReadableStreamLocked(stream)) { @@ -1884,10 +1884,10 @@ /** * @template O - * @param {TransformStream<any, O>} stream - * @param {TransformStreamDefaultController<O>} controller - * @param {(chunk: O, controller: TransformStreamDefaultController<O>) => Promise<void>} transformAlgorithm - * @param {(controller: TransformStreamDefaultController<O>) => Promise<void>} flushAlgorithm + * @param {TransformStream<any, O>} stream + * @param {TransformStreamDefaultController<O>} controller + * @param {(chunk: O, controller: TransformStreamDefaultController<O>) => Promise<void>} transformAlgorithm + * @param {(controller: TransformStreamDefaultController<O>) => Promise<void>} flushAlgorithm */ function setUpTransformStreamDefaultController( stream, @@ -1906,9 +1906,9 @@ /** * @template I * @template O - * @param {TransformStream<I, O>} stream - * @param {Transformer<I, O>} transformer - * @param {Transformer<I, O>} transformerDict + * @param {TransformStream<I, O>} stream + * @param {Transformer<I, O>} transformer + * @param {Transformer<I, O>} transformerDict */ function setUpTransformStreamDefaultControllerFromTransformer( stream, @@ -1946,14 +1946,14 @@ /** * @template W - * @param {WritableStream<W>} stream - * @param {WritableStreamDefaultController<W>} controller - * @param {(controller: WritableStreamDefaultController<W>) => Promise<void>} startAlgorithm - * @param {(chunk: W, controller: WritableStreamDefaultController<W>) => Promise<void>} writeAlgorithm - * @param {() => Promise<void>} closeAlgorithm - * @param {(reason?: any) => Promise<void>} abortAlgorithm - * @param {number} highWaterMark - * @param {(chunk: W) => number} sizeAlgorithm + * @param {WritableStream<W>} stream + * @param {WritableStreamDefaultController<W>} controller + * @param {(controller: WritableStreamDefaultController<W>) => Promise<void>} startAlgorithm + * @param {(chunk: W, controller: WritableStreamDefaultController<W>) => Promise<void>} writeAlgorithm + * @param {() => Promise<void>} closeAlgorithm + * @param {(reason?: any) => Promise<void>} abortAlgorithm + * @param {number} highWaterMark + * @param {(chunk: W) => number} sizeAlgorithm */ function setUpWritableStreamDefaultController( stream, @@ -1995,11 +1995,11 @@ /** * @template W - * @param {WritableStream<W>} stream - * @param {UnderlyingSink<W>} underlyingSink - * @param {UnderlyingSink<W>} underlyingSinkDict - * @param {number} highWaterMark - * @param {(chunk: W) => number} sizeAlgorithm + * @param {WritableStream<W>} stream + * @param {UnderlyingSink<W>} underlyingSink + * @param {UnderlyingSink<W>} underlyingSinkDict + * @param {number} highWaterMark + * @param {(chunk: W) => number} sizeAlgorithm */ function setUpWritableStreamDefaultControllerFromUnderlyingSink( stream, @@ -2044,8 +2044,8 @@ /** * @template W - * @param {WritableStreamDefaultWriter<W>} writer - * @param {WritableStream<W>} stream + * @param {WritableStreamDefaultWriter<W>} writer + * @param {WritableStream<W>} stream */ function setUpWritableStreamDefaultWriter(writer, stream) { if (isWritableStreamLocked(stream) === true) { @@ -2095,8 +2095,8 @@ /** * @template O - * @param {TransformStreamDefaultController<O>} controller - * @param {O} chunk + * @param {TransformStreamDefaultController<O>} controller + * @param {O} chunk */ function transformStreamDefaultControllerEnqueue(controller, chunk) { const stream = controller[_stream]; @@ -2127,8 +2127,8 @@ } /** - * @param {TransformStreamDefaultController} controller - * @param {any=} e + * @param {TransformStreamDefaultController} controller + * @param {any=} e */ function transformStreamDefaultControllerError(controller, e) { transformStreamError(controller[_stream], e); @@ -2136,8 +2136,8 @@ /** * @template O - * @param {TransformStreamDefaultController<O>} controller - * @param {any} chunk + * @param {TransformStreamDefaultController<O>} controller + * @param {any} chunk * @returns {Promise<void>} */ function transformStreamDefaultControllerPerformTransform(controller, chunk) { @@ -2160,8 +2160,8 @@ } /** - * @param {TransformStream} stream - * @param {any=} reason + * @param {TransformStream} stream + * @param {any=} reason * @returns {Promise<void>} */ function transformStreamDefaultSinkAbortAlgorithm(stream, reason) { @@ -2172,7 +2172,7 @@ /** * @template I * @template O - * @param {TransformStream<I, O>} stream + * @param {TransformStream<I, O>} stream * @returns {Promise<void>} */ function transformStreamDefaultSinkCloseAlgorithm(stream) { @@ -2196,8 +2196,8 @@ /** * @template I * @template O - * @param {TransformStream<I, O>} stream - * @param {I} chunk + * @param {TransformStream<I, O>} stream + * @param {I} chunk * @returns {Promise<void>} */ function transformStreamDefaultSinkWriteAlgorithm(stream, chunk) { @@ -2234,8 +2234,8 @@ } /** - * @param {TransformStream} stream - * @param {any=} e + * @param {TransformStream} stream + * @param {any=} e */ function transformStreamError(stream, e) { readableStreamDefaultControllerError( @@ -2248,8 +2248,8 @@ } /** - * @param {TransformStream} stream - * @param {any=} e + * @param {TransformStream} stream + * @param {any=} e */ function transformStreamErrorWritableAndUnblockWrite(stream, e) { transformStreamDefaultControllerClearAlgorithms(stream[_controller]); @@ -2263,8 +2263,8 @@ } /** - * @param {TransformStream} stream - * @param {boolean} backpressure + * @param {TransformStream} stream + * @param {boolean} backpressure */ function transformStreamSetBackpressure(stream, backpressure) { assert(stream[_backpressure] !== backpressure); @@ -2276,8 +2276,8 @@ } /** - * @param {WritableStream} stream - * @param {any=} reason + * @param {WritableStream} stream + * @param {any=} reason * @returns {Promise<void>} */ function writableStreamAbort(stream, reason) { @@ -2308,7 +2308,7 @@ } /** - * @param {WritableStream} stream + * @param {WritableStream} stream * @returns {Promise<void>} */ function writableStreamAddWriteRequest(stream) { @@ -2321,7 +2321,7 @@ } /** - * @param {WritableStream} stream + * @param {WritableStream} stream * @returns {Promise<void>} */ function writableStreamClose(stream) { @@ -2348,7 +2348,7 @@ } /** - * @param {WritableStream} stream + * @param {WritableStream} stream * @returns {boolean} */ function writableStreamCloseQueuedOrInFlight(stream) { @@ -2362,8 +2362,8 @@ } /** - * @param {WritableStream} stream - * @param {any=} error + * @param {WritableStream} stream + * @param {any=} error */ function writableStreamDealWithRejection(stream, error) { const state = stream[_state]; @@ -2375,7 +2375,7 @@ writableStreamFinishErroring(stream); } - /** + /** * @template W * @param {WritableStreamDefaultController<W>} controller */ @@ -2418,8 +2418,8 @@ } /** - * @param {WritableStreamDefaultController} controller - * @param {any} error + * @param {WritableStreamDefaultController} controller + * @param {any} error */ function writableStreamDefaultControllerError(controller, error) { const stream = controller[_stream]; @@ -2429,8 +2429,8 @@ } /** - * @param {WritableStreamDefaultController} controller - * @param {any} error + * @param {WritableStreamDefaultController} controller + * @param {any} error */ function writableStreamDefaultControllerErrorIfNeeded(controller, error) { if (controller[_stream][_state] === "writable") { @@ -2451,8 +2451,8 @@ /** * @template W - * @param {WritableStreamDefaultController<W>} controller - * @param {W} chunk + * @param {WritableStreamDefaultController<W>} controller + * @param {W} chunk * @returns {number} */ function writableStreamDefaultControllerGetChunkSize(controller, chunk) { @@ -2467,7 +2467,7 @@ } /** - * @param {WritableStreamDefaultController} controller + * @param {WritableStreamDefaultController} controller * @returns {number} */ function writableStreamDefaultControllerGetDesiredSize(controller) { @@ -2491,8 +2491,8 @@ /** * @template W - * @param {WritableStreamDefaultController<W>} controller - * @param {W} chunk + * @param {WritableStreamDefaultController<W>} controller + * @param {W} chunk */ function writableStreamDefaultControllerProcessWrite(controller, chunk) { const stream = controller[_stream]; @@ -2523,9 +2523,9 @@ /** * @template W - * @param {WritableStreamDefaultController<W>} controller - * @param {W} chunk - * @param {number} chunkSize + * @param {WritableStreamDefaultController<W>} controller + * @param {W} chunk + * @param {number} chunkSize */ function writableStreamDefaultControllerWrite(controller, chunk, chunkSize) { try { @@ -2548,8 +2548,8 @@ } /** - * @param {WritableStreamDefaultWriter} writer - * @param {any=} reason + * @param {WritableStreamDefaultWriter} writer + * @param {any=} reason * @returns {Promise<void>} */ function writableStreamDefaultWriterAbort(writer, reason) { @@ -2559,7 +2559,7 @@ } /** - * @param {WritableStreamDefaultWriter} writer + * @param {WritableStreamDefaultWriter} writer * @returns {Promise<void>} */ function writableStreamDefaultWriterClose(writer) { @@ -2569,7 +2569,7 @@ } /** - * @param {WritableStreamDefaultWriter} writer + * @param {WritableStreamDefaultWriter} writer * @returns {Promise<void>} */ function writableStreamDefaultWriterCloseWithErrorPropagation(writer) { @@ -2589,8 +2589,8 @@ } /** - * @param {WritableStreamDefaultWriter} writer - * @param {any=} error + * @param {WritableStreamDefaultWriter} writer + * @param {any=} error */ function writableStreamDefaultWriterEnsureClosedPromiseRejected( writer, @@ -2605,7 +2605,7 @@ setPromiseIsHandledToTrue(writer[_closedPromise].promise); } - /** + /** * @param {WritableStreamDefaultWriter} writer * @param {any=} error */ @@ -2623,7 +2623,7 @@ } /** - * @param {WritableStreamDefaultWriter} writer + * @param {WritableStreamDefaultWriter} writer * @returns {number | null} */ function writableStreamDefaultWriterGetDesiredSize(writer) { @@ -2660,8 +2660,8 @@ /** * @template W - * @param {WritableStreamDefaultWriter<W>} writer - * @param {W} chunk + * @param {WritableStreamDefaultWriter<W>} writer + * @param {W} chunk * @returns {Promise<void>} */ function writableStreamDefaultWriterWrite(writer, chunk) { @@ -2751,8 +2751,8 @@ } /** - * @param {WritableStream} stream - * @param {any=} error + * @param {WritableStream} stream + * @param {any=} error */ function writableStreamFinishInFlightCloseWithError(stream, error) { assert(stream[_inFlightCloseRequest] !== undefined); @@ -2774,8 +2774,8 @@ } /** - * @param {WritableStream} stream - * @param {any=} error + * @param {WritableStream} stream + * @param {any=} error */ function writableStreamFinishInFlightWriteWithError(stream, error) { assert(stream[_inFlightWriteRequest] !== undefined); @@ -2834,8 +2834,8 @@ } /** - * @param {WritableStream} stream - * @param {any=} reason + * @param {WritableStream} stream + * @param {any=} reason */ function writableStreamStartErroring(stream, reason) { assert(stream[_storedError] === undefined); @@ -2857,8 +2857,8 @@ } /** - * @param {WritableStream} stream - * @param {boolean} backpressure + * @param {WritableStream} stream + * @param {boolean} backpressure */ function writableStreamUpdateBackpressure(stream, backpressure) { assert(stream[_state] === "writable"); @@ -2877,8 +2877,8 @@ /** * @template T - * @param {T} value - * @param {boolean} done + * @param {T} value + * @param {boolean} done * @returns {IteratorResult<T>} */ function createIteratorResult(value, done) { @@ -2933,7 +2933,7 @@ return promise.promise; }, /** - * @param {unknown} arg + * @param {unknown} arg * @returns {Promise<IteratorResult<unknown>>} */ async return(arg) { @@ -3045,8 +3045,8 @@ [_storedError]; /** - * @param {UnderlyingSource<R>=} underlyingSource - * @param {QueuingStrategy<R>=} strategy + * @param {UnderlyingSource<R>=} underlyingSource + * @param {QueuingStrategy<R>=} strategy */ constructor(underlyingSource, strategy = {}) { const underlyingSourceDict = convertUnderlyingSource(underlyingSource); @@ -3085,7 +3085,7 @@ } /** - * @param {any=} reason + * @param {any=} reason * @returns {Promise<void>} */ cancel(reason) { @@ -3097,7 +3097,7 @@ /** * @deprecated TODO(@kitsonk): Remove in Deno 1.8 - * @param {ReadableStreamIteratorOptions=} options + * @param {ReadableStreamIteratorOptions=} options * @returns {AsyncIterableIterator<R>} */ getIterator(options = {}) { @@ -3105,7 +3105,7 @@ } /** - * @param {ReadableStreamGetReaderOptions=} options + * @param {ReadableStreamGetReaderOptions=} options * @returns {ReadableStreamDefaultReader<R>} */ getReader(options = {}) { @@ -3130,8 +3130,8 @@ /** * @template T - * @param {{ readable: ReadableStream<T>, writable: WritableStream<R> }} transform - * @param {PipeOptions=} options + * @param {{ readable: ReadableStream<T>, writable: WritableStream<R> }} transform + * @param {PipeOptions=} options * @returns {ReadableStream<T>} */ pipeThrough( @@ -3171,7 +3171,7 @@ } /** - * @param {WritableStream<R>} destination + * @param {WritableStream<R>} destination * @param {PipeOptions=} options * @returns {Promise<void>} */ @@ -3210,7 +3210,7 @@ } /** - * @param {ReadableStreamIteratorOptions=} options + * @param {ReadableStreamIteratorOptions=} options * @returns {AsyncIterableIterator<R>} */ [Symbol.asyncIterator]({ preventCancel } = {}) { @@ -3358,7 +3358,7 @@ } /** - * @param {ArrayBufferView} chunk + * @param {ArrayBufferView} chunk * @returns {void} */ enqueue(chunk) { @@ -3382,7 +3382,7 @@ } /** - * @param {any=} e + * @param {any=} e * @returns {void} */ error(e) { @@ -3390,7 +3390,7 @@ } /** - * @param {any} reason + * @param {any} reason * @returns {Promise<void>} */ [_cancelSteps](reason) { @@ -3402,7 +3402,7 @@ } /** - * @param {ReadRequest<ArrayBuffer>} readRequest + * @param {ReadRequest<ArrayBuffer>} readRequest * @returns {void} */ [_pullSteps](readRequest) { @@ -3468,7 +3468,7 @@ } /** - * @param {R} chunk + * @param {R} chunk * @returns {void} */ enqueue(chunk) { @@ -3479,7 +3479,7 @@ } /** - * @param {any=} e + * @param {any=} e * @returns {void} */ error(e) { @@ -3487,7 +3487,7 @@ } /** - * @param {any} reason + * @param {any} reason * @returns {Promise<void>} */ [_cancelSteps](reason) { @@ -3498,7 +3498,7 @@ } /** - * @param {ReadRequest<R>} readRequest + * @param {ReadRequest<R>} readRequest * @returns {void} */ [_pullSteps](readRequest) { @@ -3538,10 +3538,10 @@ [_writable]; /** - * - * @param {Transformer<I, O>} transformer - * @param {QueuingStrategy<I>} writableStrategy - * @param {QueuingStrategy<O>} readableStrategy + * + * @param {Transformer<I, O>} transformer + * @param {QueuingStrategy<I>} writableStrategy + * @param {QueuingStrategy<O>} readableStrategy */ constructor( transformer = null, @@ -3618,7 +3618,7 @@ } /** - * @param {O} chunk + * @param {O} chunk * @returns {void} */ enqueue(chunk) { @@ -3626,7 +3626,7 @@ } /** - * @param {any=} reason + * @param {any=} reason * @returns {void} */ error(reason) { @@ -3665,8 +3665,8 @@ [_writeRequests]; /** - * @param {UnderlyingSink<W>=} underlyingSink - * @param {QueuingStrategy<W>=} strategy + * @param {UnderlyingSink<W>=} underlyingSink + * @param {QueuingStrategy<W>=} strategy */ constructor(underlyingSink = null, strategy = {}) { const underlyingSinkDict = convertUnderlyingSink(underlyingSink); @@ -3693,7 +3693,7 @@ } /** - * @param {any=} reason + * @param {any=} reason * @returns {Promise<void>} */ abort(reason) { @@ -3770,7 +3770,7 @@ } /** - * @param {any} reason + * @param {any} reason * @returns {Promise<void>} */ abort(reason) { @@ -3809,7 +3809,7 @@ } /** - * @param {W} chunk + * @param {W} chunk * @returns {Promise<void>} */ write(chunk) { @@ -3856,7 +3856,7 @@ } /** - * @param {any=} reason + * @param {any=} reason * @returns {Promise<void>} */ [_abortSteps](reason) { diff --git a/op_crates/fetch/20_headers.js b/op_crates/fetch/20_headers.js index 3c6fc0b26..94e1c4076 100644 --- a/op_crates/fetch/20_headers.js +++ b/op_crates/fetch/20_headers.js @@ -39,7 +39,7 @@ */ /** - * @param {string} potentialValue + * @param {string} potentialValue * @returns {string} */ function normalizeHeaderValue(potentialValue) { @@ -72,8 +72,8 @@ /** * https://fetch.spec.whatwg.org/#concept-headers-append * @param {Headers} headers - * @param {string} name - * @param {string} value + * @param {string} name + * @param {string} value */ function appendHeader(headers, name, value) { // 1. @@ -224,8 +224,8 @@ } /** - * @param {string} name - * @param {string} value + * @param {string} name + * @param {string} value */ append(name, value) { webidl.assertBranded(this, Headers); @@ -243,7 +243,7 @@ } /** - * @param {string} name + * @param {string} name */ delete(name) { const prefix = "Failed to execute 'delete' on 'Headers'"; @@ -271,7 +271,7 @@ } /** - * @param {string} name + * @param {string} name */ get(name) { const prefix = "Failed to execute 'get' on 'Headers'"; @@ -290,7 +290,7 @@ } /** - * @param {string} name + * @param {string} name */ has(name) { const prefix = "Failed to execute 'has' on 'Headers'"; @@ -315,8 +315,8 @@ } /** - * @param {string} name - * @param {string} value + * @param {string} name + * @param {string} value */ set(name, value) { webidl.assertBranded(this, Headers); diff --git a/op_crates/fetch/21_formdata.js b/op_crates/fetch/21_formdata.js index 00f97f346..c50cf4cf7 100644 --- a/op_crates/fetch/21_formdata.js +++ b/op_crates/fetch/21_formdata.js @@ -63,8 +63,8 @@ } /** - * @param {string} name - * @param {string | Blob} valueOrBlobValue + * @param {string} name + * @param {string | Blob} valueOrBlobValue * @param {string} [filename] * @returns {void} */ @@ -101,7 +101,7 @@ } /** - * @param {string} name + * @param {string} name * @returns {void} */ delete(name) { @@ -124,7 +124,7 @@ } /** - * @param {string} name + * @param {string} name * @returns {FormDataEntryValue | null} */ get(name) { @@ -144,7 +144,7 @@ } /** - * @param {string} name + * @param {string} name * @returns {FormDataEntryValue[]} */ getAll(name) { @@ -165,7 +165,7 @@ } /** - * @param {string} name + * @param {string} name * @returns {boolean} */ has(name) { @@ -185,8 +185,8 @@ } /** - * @param {string} name - * @param {string | Blob} valueOrBlobValue + * @param {string} name + * @param {string | Blob} valueOrBlobValue * @param {string} [filename] * @returns {void} */ @@ -244,7 +244,7 @@ class MultipartBuilder { /** - * @param {FormData} formData + * @param {FormData} formData */ constructor(formData) { this.entryList = formData[entryList]; @@ -253,14 +253,14 @@ this.chunks = []; } - /** + /** * @returns {string} */ getContentType() { return `multipart/form-data; boundary=${this.boundary}`; } - /** + /** * @returns {Uint8Array} */ getBody() { @@ -296,7 +296,7 @@ ); }; - /** + /** * @param {[string, string][]} headers * @returns {void} */ @@ -312,7 +312,7 @@ this.chunks.push(encoder.encode(buf)); }; - /** + /** * @param {string} field * @param {string} filename * @param {string} [type] @@ -366,7 +366,7 @@ } /** - * @param {FormData} formdata + * @param {FormData} formdata * @returns {{body: Uint8Array, contentType: string}} */ function encodeFormData(formdata) { @@ -401,8 +401,8 @@ class MultipartParser { /** - * @param {Uint8Array} body - * @param {string | undefined} boundary + * @param {Uint8Array} body + * @param {string | undefined} boundary */ constructor(body, boundary) { if (!boundary) { @@ -521,7 +521,7 @@ } /** - * @param {Uint8Array} body + * @param {Uint8Array} body * @param {string | undefined} boundary * @returns {FormData} */ @@ -532,7 +532,7 @@ /** * @param {FormDataEntry[]} entries - * @returns {FormData} + * @returns {FormData} */ function formDataFromEntries(entries) { const fd = new FormData(); diff --git a/op_crates/fetch/22_body.js b/op_crates/fetch/22_body.js index 1c4ce4271..938e3023e 100644 --- a/op_crates/fetch/22_body.js +++ b/op_crates/fetch/22_body.js @@ -120,9 +120,9 @@ } /** - * @param {any} prototype - * @param {symbol} bodySymbol - * @param {symbol} mimeTypeSymbol + * @param {any} prototype + * @param {symbol} bodySymbol + * @param {symbol} mimeTypeSymbol * @returns {void} */ function mixinBody(prototype, bodySymbol, mimeTypeSymbol) { diff --git a/op_crates/fetch/22_http_client.js b/op_crates/fetch/22_http_client.js index 0a4be9e9f..770080cc9 100644 --- a/op_crates/fetch/22_http_client.js +++ b/op_crates/fetch/22_http_client.js @@ -25,7 +25,7 @@ class HttpClient { /** - * @param {number} rid + * @param {number} rid */ constructor(rid) { this.rid = rid; diff --git a/op_crates/fetch/23_request.js b/op_crates/fetch/23_request.js index ce42d7ac5..0e4bd2a3f 100644 --- a/op_crates/fetch/23_request.js +++ b/op_crates/fetch/23_request.js @@ -58,11 +58,11 @@ }; /** - * @param {string} method - * @param {string} url - * @param {[string, string][]} headerList - * @param {InnerBody} body - * @returns + * @param {string} method + * @param {string} url + * @param {[string, string][]} headerList + * @param {InnerBody} body + * @returns */ function newInnerRequest(method, url, headerList = [], body = null) { return { @@ -76,7 +76,7 @@ /** * https://fetch.spec.whatwg.org/#concept-request-clone - * @param {InnerRequest} request + * @param {InnerRequest} request * @returns {InnerRequest} */ function cloneInnerRequest(request) { @@ -185,8 +185,8 @@ /** * https://fetch.spec.whatwg.org/#dom-request - * @param {RequestInfo} input - * @param {RequestInit} init + * @param {RequestInfo} input + * @param {RequestInit} init */ constructor(input, init = {}) { const prefix = "Failed to construct 'Request'"; diff --git a/op_crates/fetch/23_response.js b/op_crates/fetch/23_response.js index 42d16d44e..6bd7a6487 100644 --- a/op_crates/fetch/23_response.js +++ b/op_crates/fetch/23_response.js @@ -53,7 +53,7 @@ /** * @param {number} status - * @returns {boolean} + * @returns {boolean} */ function nullBodyStatus(status) { return status === 101 || status === 204 || status === 205 || status === 304; @@ -61,7 +61,7 @@ /** * @param {number} status - * @returns {boolean} + * @returns {boolean} */ function redirectStatus(status) { return status === 301 || status === 302 || status === 303 || @@ -70,7 +70,7 @@ /** * https://fetch.spec.whatwg.org/#concept-response-clone - * @param {InnerResponse} response + * @param {InnerResponse} response * @returns {InnerResponse} */ function cloneInnerResponse(response) { @@ -220,8 +220,8 @@ } /** - * @param {BodyInit | null} body - * @param {ResponseInit} init + * @param {BodyInit | null} body + * @param {ResponseInit} init */ constructor(body = null, init = {}) { const prefix = "Failed to construct 'Response'"; diff --git a/op_crates/fetch/26_fetch.js b/op_crates/fetch/26_fetch.js index a6d1608d0..cd86d6023 100644 --- a/op_crates/fetch/26_fetch.js +++ b/op_crates/fetch/26_fetch.js @@ -32,8 +32,8 @@ ]; /** - * @param {{ method: string, url: string, headers: [string, string][], clientRid: number | null, hasBody: boolean }} args - * @param {Uint8Array | null} body + * @param {{ method: string, url: string, headers: [string, string][], clientRid: number | null, hasBody: boolean }} args + * @param {Uint8Array | null} body * @returns {{ requestRid: number, requestBodyRid: number | null }} */ function opFetch(args, body) { @@ -41,7 +41,7 @@ } /** - * @param {number} rid + * @param {number} rid * @returns {Promise<{ status: number, statusText: string, headers: [string, string][], url: string, responseRid: number }>} */ function opFetchSend(rid) { @@ -49,8 +49,8 @@ } /** - * @param {number} rid - * @param {Uint8Array} body + * @param {number} rid + * @param {Uint8Array} body * @returns {Promise<void>} */ function opFetchRequestWrite(rid, body) { @@ -58,8 +58,8 @@ } /** - * @param {number} rid - * @param {Uint8Array} body + * @param {number} rid + * @param {Uint8Array} body * @returns {Promise<number>} */ function opFetchResponseRead(rid, body) { @@ -105,7 +105,7 @@ } /** - * @param {InnerRequest} req + * @param {InnerRequest} req * @param {boolean} recursive * @returns {Promise<InnerResponse>} */ @@ -268,8 +268,8 @@ } /** - * @param {RequestInfo} input - * @param {RequestInit} init + * @param {RequestInfo} input + * @param {RequestInit} init */ async function fetch(input, init = {}) { const prefix = "Failed to call 'fetch'"; diff --git a/op_crates/file/01_file.js b/op_crates/file/01_file.js index 47b44a08e..05c410572 100644 --- a/op_crates/file/01_file.js +++ b/op_crates/file/01_file.js @@ -69,7 +69,7 @@ /** * @param {...Uint8Array} bytesArrays - * @returns {Uint8Array} + * @returns {Uint8Array} */ function concatUint8Arrays(...bytesArrays) { let byteLength = 0; @@ -90,7 +90,7 @@ /** @typedef {BufferSource | Blob | string} BlobPart */ - /** + /** * @param {BlobPart[]} parts * @param {string} endings * @returns {Uint8Array} @@ -125,7 +125,7 @@ } /** - * @param {string} str + * @param {string} str * @returns {string} */ function normalizeType(str) { @@ -186,7 +186,7 @@ return this.#type; } - /** + /** * @param {number} [start] * @param {number} [end] * @param {string} [contentType] @@ -346,9 +346,9 @@ [_LastModfied]; /** - * @param {BlobPart[]} fileBits - * @param {string} fileName - * @param {FilePropertyBag} options + * @param {BlobPart[]} fileBits + * @param {string} fileName + * @param {FilePropertyBag} options */ constructor(fileBits, fileName, options = {}) { const prefix = "Failed to construct 'File'"; diff --git a/op_crates/file/02_filereader.js b/op_crates/file/02_filereader.js index 640c6dd9e..9575ab85a 100644 --- a/op_crates/file/02_filereader.js +++ b/op_crates/file/02_filereader.js @@ -37,7 +37,7 @@ [aborted] = false; - /** + /** * @param {Blob} blob * @param {{kind: "ArrayBuffer" | "Text" | "DataUrl" | "BinaryString", encoding?: string}} readtype */ @@ -309,7 +309,7 @@ this.#readOperation(blob, { kind: "DataUrl" }); } - /** + /** * @param {Blob} blob * @param {string} [encoding] */ diff --git a/op_crates/file/03_blob_url.js b/op_crates/file/03_blob_url.js index 570aa4342..2b5e16b55 100644 --- a/op_crates/file/03_blob_url.js +++ b/op_crates/file/03_blob_url.js @@ -19,7 +19,7 @@ const { _byteSequence } = window.__bootstrap.file; const { URL } = window.__bootstrap.url; - /** + /** * @param {Blob} blob * @returns {string} */ @@ -40,7 +40,7 @@ return url; } - /** + /** * @param {string} url * @returns {void} */ diff --git a/op_crates/url/00_url.js b/op_crates/url/00_url.js index f51b4aedc..340937748 100644 --- a/op_crates/url/00_url.js +++ b/op_crates/url/00_url.js @@ -395,7 +395,7 @@ * This function implements application/x-www-form-urlencoded parsing. * https://url.spec.whatwg.org/#concept-urlencoded-parser * @param {Uint8Array} bytes - * @returns {[string, string][]} + * @returns {[string, string][]} */ function parseUrlEncoded(bytes) { return core.opSync("op_url_parse_search_params", null, bytes); diff --git a/op_crates/web/00_infra.js b/op_crates/web/00_infra.js index bc87c8217..05f68268f 100644 --- a/op_crates/web/00_infra.js +++ b/op_crates/web/00_infra.js @@ -67,7 +67,7 @@ /** * Turn a string of chars into a regex safe matcher. - * @param {string[]} chars + * @param {string[]} chars * @returns {string} */ function regexMatcher(chars) { diff --git a/op_crates/web/01_mimesniff.js b/op_crates/web/01_mimesniff.js index 077a40df1..b42dd1409 100644 --- a/op_crates/web/01_mimesniff.js +++ b/op_crates/web/01_mimesniff.js @@ -19,7 +19,7 @@ } = window.__bootstrap.infra; /** - * @typedef MimeType + * @typedef MimeType * @property {string} type * @property {string} subtype * @property {Map<string,string>} parameters @@ -160,7 +160,7 @@ } /** - * @param {MimeType} mimeType + * @param {MimeType} mimeType * @returns {string} */ function essence(mimeType) { @@ -168,7 +168,7 @@ } /** - * @param {MimeType} mimeType + * @param {MimeType} mimeType * @returns {string} */ function serializeMimeType(mimeType) { diff --git a/op_crates/web/08_text_encoding.js b/op_crates/web/08_text_encoding.js index 980de339c..c84d7c18e 100644 --- a/op_crates/web/08_text_encoding.js +++ b/op_crates/web/08_text_encoding.js @@ -4529,7 +4529,7 @@ }; /** - * @param {Uint8Array} bytes + * @param {Uint8Array} bytes */ function decode(bytes, encoding) { const BOMEncoding = BOMSniff(bytes); @@ -4543,7 +4543,7 @@ } /** - * @param {Uint8Array} bytes + * @param {Uint8Array} bytes */ function BOMSniff(bytes) { const BOM = bytes.subarray(0, 3); diff --git a/runtime/js/40_permissions.js b/runtime/js/40_permissions.js index dd4ce5533..b36fb643a 100644 --- a/runtime/js/40_permissions.js +++ b/runtime/js/40_permissions.js @@ -27,7 +27,7 @@ ]; /** - * @param {Deno.PermissionDescriptor} desc + * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opQuery(desc) { @@ -35,7 +35,7 @@ } /** - * @param {Deno.PermissionDescriptor} desc + * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opRevoke(desc) { @@ -43,7 +43,7 @@ } /** - * @param {Deno.PermissionDescriptor} desc + * @param {Deno.PermissionDescriptor} desc * @returns {Deno.PermissionState} */ function opRequest(desc) { @@ -63,8 +63,8 @@ } /** - * @param {{ state: Deno.PermissionState }} state - * @param {unknown} key + * @param {{ state: Deno.PermissionState }} state + * @param {unknown} key */ constructor(state = null, key = null) { if (key != illegalConstructorKey) { @@ -75,7 +75,7 @@ } /** - * @param {Event} event + * @param {Event} event * @returns {boolean} */ dispatchEvent(event) { @@ -98,9 +98,9 @@ const statusCache = new Map(); /** - * - * @param {Deno.PermissionDescriptor} desc - * @param {Deno.PermissionState} state + * + * @param {Deno.PermissionDescriptor} desc + * @param {Deno.PermissionState} state * @returns {PermissionStatus} */ function cache(desc, state) { @@ -126,7 +126,7 @@ } /** - * @param {unknown} desc + * @param {unknown} desc * @returns {desc is Deno.PermissionDescriptor} */ function isValidDescriptor(desc) { diff --git a/tools/util.js b/tools/util.js index f14aca697..72163c546 100644 --- a/tools/util.js +++ b/tools/util.js @@ -69,7 +69,7 @@ function gitStaged(baseDir, patterns) { return getFilesFromGit(baseDir, cmd); } -/** +/** * Recursively list all files in (a subdirectory of) a git worktree. * * Optionally, glob patterns may be specified to e.g. only list files with a * certain extension. @@ -77,7 +77,7 @@ function gitStaged(baseDir, patterns) { * * Directory names themselves are not listed (but the files inside are). * * Submodules and their contents are ignored entirely. * * This function fails if the query matches no files. - * + * * If --staged argument was provided when program is run * only staged sources will be returned. */ |