diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/crypto/00_crypto.js | 18 | ||||
-rw-r--r-- | ext/net/lib.deno_net.d.ts | 108 | ||||
-rw-r--r-- | ext/timers/01_timers.js | 12 | ||||
-rw-r--r-- | ext/url/lib.deno_url.d.ts | 1 | ||||
-rw-r--r-- | ext/web/02_structured_clone.js | 2 | ||||
-rw-r--r-- | ext/web/06_streams.js | 3 | ||||
-rw-r--r-- | ext/web/08_text_encoding.js | 2 | ||||
-rw-r--r-- | ext/web/10_filereader.js | 2 | ||||
-rw-r--r-- | ext/web/lib.deno_web.d.ts | 54 | ||||
-rw-r--r-- | ext/webgpu/01_webgpu.js | 18 |
10 files changed, 107 insertions, 113 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index 354654077..a95c0be1b 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -944,10 +944,10 @@ } /** - * @param {string} format - * @param {CryptoKey} key - * @returns {Promise<any>} - */ + * @param {string} format + * @param {CryptoKey} key + * @returns {Promise<any>} + */ // deno-lint-ignore require-await async exportKey(format, key) { webidl.assertBranded(this, SubtleCrypto); @@ -1033,11 +1033,11 @@ } /** - * @param {AlgorithmIdentifier} algorithm - * @param {CryptoKey} baseKey - * @param {number} length - * @returns {Promise<ArrayBuffer>} - */ + * @param {AlgorithmIdentifier} algorithm + * @param {CryptoKey} baseKey + * @param {number} length + * @returns {Promise<ArrayBuffer>} + */ async deriveBits(algorithm, baseKey, length) { webidl.assertBranded(this, SubtleCrypto); const prefix = "Failed to execute 'deriveBits' on 'SubtleCrypto'"; diff --git a/ext/net/lib.deno_net.d.ts b/ext/net/lib.deno_net.d.ts index d35e01e31..e41dd62d8 100644 --- a/ext/net/lib.deno_net.d.ts +++ b/ext/net/lib.deno_net.d.ts @@ -22,7 +22,7 @@ declare namespace Deno { /** Waits for and resolves to the next connection to the `Listener`. */ accept(): Promise<Conn>; /** Close closes the listener. Any pending accept promises will be rejected - * with errors. */ + * with errors. */ close(): void; /** Return the address of the `Listener`. */ readonly addr: Addr; @@ -41,7 +41,7 @@ declare namespace Deno { /** The resource ID of the connection. */ readonly rid: number; /** Shuts down (`shutdown(2)`) the write side of the connection. Most - * callers should just use `close()`. */ + * callers should just use `close()`. */ closeWrite(): Promise<void>; } @@ -49,20 +49,20 @@ declare namespace Deno { /** The port to listen on. */ port: number; /** A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `0.0.0.0`. */ + * If not specified, defaults to `0.0.0.0`. */ hostname?: string; } /** Listen announces on the local transport address. - * - * ```ts - * const listener1 = Deno.listen({ port: 80 }) - * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 }) - * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 }); - * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" }); - * ``` - * - * Requires `allow-net` permission. */ + * + * ```ts + * const listener1 = Deno.listen({ port: 80 }) + * const listener2 = Deno.listen({ hostname: "192.0.2.1", port: 80 }) + * const listener3 = Deno.listen({ hostname: "[2001:db8::1]", port: 80 }); + * const listener4 = Deno.listen({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission. */ export function listen( options: ListenOptions & { transport?: "tcp" }, ): Listener; @@ -78,73 +78,73 @@ declare namespace Deno { } /** Listen announces on the local transport address over TLS (transport layer - * security). - * - * ```ts - * const lstnr = Deno.listenTls({ port: 443, certFile: "./server.crt", keyFile: "./server.key" }); - * ``` - * - * Requires `allow-net` permission. */ + * security). + * + * ```ts + * const lstnr = Deno.listenTls({ port: 443, certFile: "./server.crt", keyFile: "./server.key" }); + * ``` + * + * Requires `allow-net` permission. */ export function listenTls(options: ListenTlsOptions): Listener; export interface ConnectOptions { /** The port to connect to. */ port: number; /** A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `127.0.0.1`. */ + * If not specified, defaults to `127.0.0.1`. */ hostname?: string; transport?: "tcp"; } /** - * Connects to the hostname (default is "127.0.0.1") and port on the named - * transport (default is "tcp"), and resolves to the connection (`Conn`). - * - * ```ts - * const conn1 = await Deno.connect({ port: 80 }); - * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); - * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); - * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); - * ``` - * - * Requires `allow-net` permission for "tcp". */ + * Connects to the hostname (default is "127.0.0.1") and port on the named + * transport (default is "tcp"), and resolves to the connection (`Conn`). + * + * ```ts + * const conn1 = await Deno.connect({ port: 80 }); + * const conn2 = await Deno.connect({ hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connect({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connect({ hostname: "golang.org", port: 80, transport: "tcp" }); + * ``` + * + * Requires `allow-net` permission for "tcp". */ export function connect(options: ConnectOptions): Promise<Conn>; export interface ConnectTlsOptions { /** The port to connect to. */ port: number; /** A literal IP address or host name that can be resolved to an IP address. - * If not specified, defaults to `127.0.0.1`. */ + * If not specified, defaults to `127.0.0.1`. */ hostname?: string; /** Server certificate file. */ certFile?: string; } /** Establishes a secure connection over TLS (transport layer security) using - * an optional cert file, hostname (default is "127.0.0.1") and port. The - * cert file is optional and if not included Mozilla's root certificates will - * be used (see also https://github.com/ctz/webpki-roots for specifics) - * - * ```ts - * const conn1 = await Deno.connectTls({ port: 80 }); - * const conn2 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "192.0.2.1", port: 80 }); - * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 }); - * const conn4 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "golang.org", port: 80}); - * ``` - * - * Requires `allow-net` permission. - */ + * an optional cert file, hostname (default is "127.0.0.1") and port. The + * cert file is optional and if not included Mozilla's root certificates will + * be used (see also https://github.com/ctz/webpki-roots for specifics) + * + * ```ts + * const conn1 = await Deno.connectTls({ port: 80 }); + * const conn2 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "192.0.2.1", port: 80 }); + * const conn3 = await Deno.connectTls({ hostname: "[2001:db8::1]", port: 80 }); + * const conn4 = await Deno.connectTls({ certFile: "./certs/my_custom_root_CA.pem", hostname: "golang.org", port: 80}); + * ``` + * + * Requires `allow-net` permission. + */ export function connectTls(options: ConnectTlsOptions): Promise<Conn>; /** Shutdown socket send operations. - * - * Matches behavior of POSIX shutdown(3). - * - * ```ts - * const listener = Deno.listen({ port: 80 }); - * const conn = await listener.accept(); - * Deno.shutdown(conn.rid); - * ``` - */ + * + * Matches behavior of POSIX shutdown(3). + * + * ```ts + * const listener = Deno.listen({ port: 80 }); + * const conn = await listener.accept(); + * Deno.shutdown(conn.rid); + * ``` + */ export function shutdown(rid: number): Promise<void>; } diff --git a/ext/timers/01_timers.js b/ext/timers/01_timers.js index a00d5d9b9..a92f9ab82 100644 --- a/ext/timers/01_timers.js +++ b/ext/timers/01_timers.js @@ -327,12 +327,12 @@ const pendingFireTimers = []; /** Process and run a single ready timer macrotask. - * This function should be registered through Deno.core.setMacrotaskCallback. - * Returns true when all ready macrotasks have been processed, false if more - * ready ones are available. The Isolate future would rely on the return value - * to repeatedly invoke this function until depletion. Multiple invocations - * of this function one at a time ensures newly ready microtasks are processed - * before next macrotask timer callback is invoked. */ + * This function should be registered through Deno.core.setMacrotaskCallback. + * Returns true when all ready macrotasks have been processed, false if more + * ready ones are available. The Isolate future would rely on the return value + * to repeatedly invoke this function until depletion. Multiple invocations + * of this function one at a time ensures newly ready microtasks are processed + * before next macrotask timer callback is invoked. */ function handleTimerMacrotask() { if (pendingFireTimers.length > 0) { fire(ArrayPrototypeShift(pendingFireTimers)); diff --git a/ext/url/lib.deno_url.d.ts b/ext/url/lib.deno_url.d.ts index 3f9745352..df7acbe60 100644 --- a/ext/url/lib.deno_url.d.ts +++ b/ext/url/lib.deno_url.d.ts @@ -88,7 +88,6 @@ declare class URLSearchParams { * console.log(value, key, parent); * }); * ``` - * */ forEach( callbackfn: (value: string, key: string, parent: this) => void, diff --git a/ext/web/02_structured_clone.js b/ext/web/02_structured_clone.js index 4845c6508..65a015a68 100644 --- a/ext/web/02_structured_clone.js +++ b/ext/web/02_structured_clone.js @@ -38,7 +38,7 @@ } /** Clone a value in a similar way to structured cloning. It is similar to a -* StructureDeserialize(StructuredSerialize(...)). */ + * StructureDeserialize(StructuredSerialize(...)). */ function structuredClone(value) { // Performance optimization for buffers, otherwise // `serialize/deserialize` will allocate new buffer. diff --git a/ext/web/06_streams.js b/ext/web/06_streams.js index c4bfad0c8..4199be6e0 100644 --- a/ext/web/06_streams.js +++ b/ext/web/06_streams.js @@ -2850,7 +2850,7 @@ /** * @template W * @param {WritableStream<W>} stream - * */ + */ function writableStreamMarkFirstWriteRequestInFlight(stream) { assert(stream[_inFlightWriteRequest] === undefined); assert(stream[_writeRequests].length); @@ -3765,7 +3765,6 @@ [_writable]; /** - * * @param {Transformer<I, O>} transformer * @param {QueuingStrategy<I>} writableStrategy * @param {QueuingStrategy<O>} readableStrategy diff --git a/ext/web/08_text_encoding.js b/ext/web/08_text_encoding.js index 9be4aa753..e37fbdcd7 100644 --- a/ext/web/08_text_encoding.js +++ b/ext/web/08_text_encoding.js @@ -38,7 +38,6 @@ #rid = null; /** - * * @param {string} label * @param {TextDecoderOptions} options */ @@ -198,7 +197,6 @@ #transform; /** - * * @param {string} label * @param {TextDecoderOptions} options */ diff --git a/ext/web/10_filereader.js b/ext/web/10_filereader.js index 3ca53df7d..760533f32 100644 --- a/ext/web/10_filereader.js +++ b/ext/web/10_filereader.js @@ -354,7 +354,7 @@ /** * @param {Blob} blob * @param {string} [encoding] - */ + */ readAsText(blob, encoding = undefined) { webidl.assertBranded(this, FileReader); const prefix = "Failed to execute 'readAsBinaryString' on 'FileReader'"; diff --git a/ext/web/lib.deno_web.d.ts b/ext/web/lib.deno_web.d.ts index 3f110353f..7733c7a4f 100644 --- a/ext/web/lib.deno_web.d.ts +++ b/ext/web/lib.deno_web.d.ts @@ -22,54 +22,54 @@ interface EventInit { declare class Event { constructor(type: string, eventInitDict?: EventInit); /** Returns true or false depending on how event was initialized. True if - * event goes through its target's ancestors in reverse tree order, and - * false otherwise. */ + * event goes through its target's ancestors in reverse tree order, and + * false otherwise. */ readonly bubbles: boolean; cancelBubble: boolean; /** Returns true or false depending on how event was initialized. Its return - * value does not always carry meaning, but true can indicate that part of the - * operation during which event was dispatched, can be canceled by invoking - * the preventDefault() method. */ + * value does not always carry meaning, but true can indicate that part of the + * operation during which event was dispatched, can be canceled by invoking + * the preventDefault() method. */ readonly cancelable: boolean; /** Returns true or false depending on how event was initialized. True if - * event invokes listeners past a ShadowRoot node that is the root of its - * target, and false otherwise. */ + * event invokes listeners past a ShadowRoot node that is the root of its + * target, and false otherwise. */ readonly composed: boolean; /** Returns the object whose event listener's callback is currently being - * invoked. */ + * invoked. */ readonly currentTarget: EventTarget | null; /** Returns true if preventDefault() was invoked successfully to indicate - * cancellation, and false otherwise. */ + * cancellation, and false otherwise. */ readonly defaultPrevented: boolean; /** Returns the event's phase, which is one of NONE, CAPTURING_PHASE, - * AT_TARGET, and BUBBLING_PHASE. */ + * AT_TARGET, and BUBBLING_PHASE. */ readonly eventPhase: number; /** Returns true if event was dispatched by the user agent, and false - * otherwise. */ + * otherwise. */ readonly isTrusted: boolean; /** Returns the object to which event is dispatched (its target). */ readonly target: EventTarget | null; /** Returns the event's timestamp as the number of milliseconds measured - * relative to the time origin. */ + * relative to the time origin. */ readonly timeStamp: number; /** Returns the type of event, e.g. "click", "hashchange", or "submit". */ readonly type: string; /** Returns the invocation target objects of event's path (objects on which - * listeners will be invoked), except for any nodes in shadow trees of which - * the shadow root's mode is "closed" that are not reachable from event's - * currentTarget. */ + * listeners will be invoked), except for any nodes in shadow trees of which + * the shadow root's mode is "closed" that are not reachable from event's + * currentTarget. */ composedPath(): EventTarget[]; /** If invoked when the cancelable attribute value is true, and while - * executing a listener for the event with passive set to false, signals to - * the operation that caused event to be dispatched that it needs to be - * canceled. */ + * executing a listener for the event with passive set to false, signals to + * the operation that caused event to be dispatched that it needs to be + * canceled. */ preventDefault(): void; /** Invoking this method prevents event from reaching any registered event - * listeners after the current one finishes running and, when dispatched in a - * tree, also prevents event from reaching any other objects. */ + * listeners after the current one finishes running and, when dispatched in a + * tree, also prevents event from reaching any other objects. */ stopImmediatePropagation(): void; /** When dispatched in a tree, invoking this method prevents event from - * reaching any objects other than the current object. */ + * reaching any objects other than the current object. */ stopPropagation(): void; readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; @@ -82,9 +82,9 @@ declare class Event { } /** - * EventTarget is a DOM interface implemented by objects that can receive events - * and may have listeners for them. - */ + * EventTarget is a DOM interface implemented by objects that can receive events + * and may have listeners for them. + */ declare class EventTarget { /** Appends an event listener for events whose type attribute value is type. * The callback argument sets the callback that will be invoked when the event @@ -240,7 +240,7 @@ declare class AbortController { /** Returns the AbortSignal object associated with this object. */ readonly signal: AbortSignal; /** Invoking this method will set this object's AbortSignal's aborted flag and - * signal to any observers that the associated activity is to be aborted. */ + * signal to any observers that the associated activity is to be aborted. */ abort(): void; } @@ -249,10 +249,10 @@ interface AbortSignalEventMap { } /** A signal object that allows you to communicate with a DOM request (such as a - * Fetch) and abort it if required via an AbortController object. */ + * Fetch) and abort it if required via an AbortController object. */ interface AbortSignal extends EventTarget { /** Returns true if this AbortSignal's AbortController has signaled to abort, - * and false otherwise. */ + * and false otherwise. */ readonly aborted: boolean; onabort: ((this: AbortSignal, ev: Event) => any) | null; addEventListener<K extends keyof AbortSignalEventMap>( diff --git a/ext/webgpu/01_webgpu.js b/ext/webgpu/01_webgpu.js index 3954a93b7..9d7ce3f3a 100644 --- a/ext/webgpu/01_webgpu.js +++ b/ext/webgpu/01_webgpu.js @@ -219,10 +219,10 @@ */ /** - * @param {string} name - * @param {InnerGPUAdapter} inner - * @returns {GPUAdapter} - */ + * @param {string} name + * @param {InnerGPUAdapter} inner + * @returns {GPUAdapter} + */ function createGPUAdapter(name, inner) { /** @type {GPUAdapter} */ const adapter = webidl.createBranded(GPUAdapter); @@ -544,7 +544,6 @@ const _message = Symbol("[[message]]"); /** - * * @param {string | undefined} reason * @param {string} message * @returns {GPUDeviceLostInfo} @@ -2269,8 +2268,8 @@ /** * @param {string | null} label - * @param {InnerGPUDevice} device - * @param {number} rid + * @param {InnerGPUDevice} device + * @param {number} rid * @returns {GPUBindGroup} */ function createGPUBindGroup(label, device, rid) { @@ -2312,8 +2311,8 @@ /** * @param {string | null} label - * @param {InnerGPUDevice} device - * @param {number} rid + * @param {InnerGPUDevice} device + * @param {number} rid * @returns {GPUShaderModule} */ function createGPUShaderModule(label, device, rid) { @@ -3377,7 +3376,6 @@ } /** - * * @param {number} x * @param {number} y * @param {number} width |