1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

feat(fmt): add basic JS doc formatting (#11902)

This commit is contained in:
David Sherret 2021-09-02 18:28:12 -04:00 committed by GitHub
parent 1bf7b90ca8
commit 987716798f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 260 additions and 271 deletions

View file

@ -36,9 +36,9 @@
"tools/wpt/manifest.json"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.53.0.wasm",
"https://plugins.dprint.dev/json-0.12.3.wasm",
"https://plugins.dprint.dev/markdown-0.9.6.wasm",
"https://plugins.dprint.dev/typescript-0.54.0.wasm",
"https://plugins.dprint.dev/json-0.13.0.wasm",
"https://plugins.dprint.dev/markdown-0.10.0.wasm",
"https://plugins.dprint.dev/toml-0.5.1.wasm"
]
}

16
Cargo.lock generated
View file

@ -1034,9 +1034,9 @@ dependencies = [
[[package]]
name = "dprint-core"
version = "0.44.0"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58e8b33392ddbb25277c26d9af64f84d1dd661d3a98aeead9abb114854550ad2"
checksum = "c5f145afa493cba0217d2c52e256e7626730b8ed97c9db4e20e0db8c242458ca"
dependencies = [
"bumpalo",
"fnv",
@ -1045,9 +1045,9 @@ dependencies = [
[[package]]
name = "dprint-plugin-json"
version = "0.12.3"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2af0c28f3fa7dcc4bfa0f6d88bd55e2cf13e3137e2038952a356a3a78698991"
checksum = "4a32a4eef2c639055370f16a359f0278025058e63193f0ad2340f30bf7ca8361"
dependencies = [
"dprint-core",
"jsonc-parser",
@ -1056,9 +1056,9 @@ dependencies = [
[[package]]
name = "dprint-plugin-markdown"
version = "0.9.6"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdd7aeda8d9feccc49f178bf246fff6746afee584870c49ee4c4bd890cfb5da8"
checksum = "48b364aed2db4ccf8747dc1d9c7eb52a5e981a705c7aadfddd297fc4c3310772"
dependencies = [
"dprint-core",
"pulldown-cmark",
@ -1068,9 +1068,9 @@ dependencies = [
[[package]]
name = "dprint-plugin-typescript"
version = "0.53.0"
version = "0.54.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "63674b5e577e3244436463aa8ab59947aba0a3d5b4de6d181c6bd7a3e190b336"
checksum = "2249bbc5f46daecd4de4157cec4c4a118724024a213bea8a53ac693047959291"
dependencies = [
"dprint-core",
"dprint-swc-ecma-ast-view",

View file

@ -56,9 +56,9 @@ byteorder = "1.4.3"
clap = "2.33.3"
data-url = "0.1.0"
dissimilar = "1.0.2"
dprint-plugin-json = "0.12.3"
dprint-plugin-markdown = "0.9.6"
dprint-plugin-typescript = "0.53.0"
dprint-plugin-json = "0.13.0"
dprint-plugin-markdown = "0.10.0"
dprint-plugin-typescript = "0.54.0"
encoding_rs = "0.8.28"
env_logger = "0.8.4"
fancy-regex = "0.7.1"

View file

@ -54,7 +54,7 @@ declare interface PerformanceMeasureOptions {
detail?: any;
/** Timestamp to be used as the start time or string to be used as start
* mark.*/
* mark. */
start?: string | number;
/** Duration between the start and end times. */
@ -121,7 +121,7 @@ declare namespace Deno {
* `only` set to true and fail the test suite. */
only?: boolean;
/** Check that the number of async completed ops after the test is the same
* as number of dispatched ops. Defaults to true.*/
* as number of dispatched ops. Defaults to true. */
sanitizeOps?: boolean;
/** Ensure the test case does not "leak" resources - ie. the resource table
* after the test has exactly the same contents as before the test. Defaults
@ -183,7 +183,7 @@ declare namespace Deno {
* assertEquals(decoder.decode(data), "Hello world");
* });
* ```
* */
*/
export function test(name: string, fn: () => void | Promise<void>): void;
/** Exit the Deno process with optional exit code. If no exit code is supplied
@ -295,7 +295,6 @@ declare namespace Deno {
export function linkSync(oldpath: string, newpath: string): void;
/**
*
* Creates `newpath` as a hard link to `oldpath`.
*
* ```ts
@ -866,7 +865,7 @@ declare namespace Deno {
* any write calls on it will overwrite its contents, by default without
* truncating it. */
write?: boolean;
/**Sets the option for the append mode. This option, when `true`, means that
/** Sets the option for the append mode. This option, when `true`, means that
* writes will append to a file instead of overwriting previous contents.
* Note that setting `{ write: true, append: true }` has the same effect as
* setting only `{ append: true }`. */
@ -901,7 +900,6 @@ declare namespace Deno {
}
/**
*
* Check if a given resource id (`rid`) is a TTY.
*
* ```ts
@ -1536,7 +1534,7 @@ declare namespace Deno {
*
* Requires `allow-read` permission for the target path.
* Also requires `allow-read` permission for the CWD if the target path is
* relative.*/
* relative. */
export function realPathSync(path: string | URL): string;
/** Resolves to the absolute normalized path, with symbolic links resolved.
@ -1552,7 +1550,7 @@ declare namespace Deno {
*
* Requires `allow-read` permission for the target path.
* Also requires `allow-read` permission for the CWD if the target path is
* relative.*/
* relative. */
export function realPath(path: string | URL): Promise<string>;
export interface DirEntry {
@ -1914,7 +1912,7 @@ declare namespace Deno {
* console.log(">>>> event", event);
* // { kind: "create", paths: [ "/foo.txt" ] }
* }
*```
* ```
*
* Requires `allow-read` permission.
*
@ -1968,7 +1966,7 @@ declare namespace Deno {
* ]);
* p.close();
* ```
**/
*/
status(): Promise<ProcessStatus>;
/** Buffer the stdout until EOF and return it as `Uint8Array`.
*

View file

@ -111,7 +111,7 @@ declare namespace WebAssembly {
/**
* Given a `Module` and string, returns a copy of the contents of all custom sections in the
* module with the given string name.
* */
*/
static customSections(
moduleObject: Module,
sectionName: string,
@ -494,7 +494,7 @@ declare interface PerformanceMeasureOptions {
detail?: any;
/** Timestamp to be used as the start time or string to be used as start
* mark.*/
* mark. */
start?: string | number;
/** Duration between the start and end times. */

View file

@ -64,7 +64,6 @@ declare namespace Deno {
* ```
*
* Requires `allow-env` permission.
*
*/
export function osRelease(): string;
@ -80,7 +79,6 @@ declare namespace Deno {
* ```
*
* Requires `allow-env` permission.
*
*/
export function systemMemoryInfo(): SystemMemoryInfo;
@ -958,137 +956,137 @@ declare namespace Deno {
* Set this to "none" to revoke all permissions.
*
* Defaults to "inherit".
*/
*/
permissions?: "inherit" | "none" | {
/** Specifies if the `net` permission should be requested or revoked.
* If set to `"inherit"`, the current `env` permission will be inherited.
* If set to `true`, the global `net` permission will be requested.
* If set to `false`, the global `net` permission will be revoked.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `env` permission will be inherited.
* If set to `true`, the global `net` permission will be requested.
* If set to `false`, the global `net` permission will be revoked.
*
* Defaults to "inherit".
*/
env?: "inherit" | boolean | string[];
/** Specifies if the `hrtime` permission should be requested or revoked.
* If set to `"inherit"`, the current `hrtime` permission will be inherited.
* If set to `true`, the global `hrtime` permission will be requested.
* If set to `false`, the global `hrtime` permission will be revoked.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `hrtime` permission will be inherited.
* If set to `true`, the global `hrtime` permission will be requested.
* If set to `false`, the global `hrtime` permission will be revoked.
*
* Defaults to "inherit".
*/
hrtime?: "inherit" | boolean;
/** Specifies if the `net` permission should be requested or revoked.
* if set to `"inherit"`, the current `net` permission will be inherited.
* if set to `true`, the global `net` permission will be requested.
* if set to `false`, the global `net` permission will be revoked.
* if set to `string[]`, the `net` permission will be requested with the
* specified host strings with the format `"<host>[:<port>]`.
*
* Defaults to "inherit".
*
* Examples:
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "inherit",
* permissions: {
* net: "inherit",
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" })
* assertEquals(status.state, "granted");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "true",
* permissions: {
* net: true,
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" });
* assertEquals(status.state, "granted");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "false",
* permissions: {
* net: false,
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" });
* assertEquals(status.state, "denied");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "localhost:8080",
* permissions: {
* net: ["localhost:8080"],
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" });
* assertEquals(status.state, "granted");
* },
* });
* ```
*/
* if set to `"inherit"`, the current `net` permission will be inherited.
* if set to `true`, the global `net` permission will be requested.
* if set to `false`, the global `net` permission will be revoked.
* if set to `string[]`, the `net` permission will be requested with the
* specified host strings with the format `"<host>[:<port>]`.
*
* Defaults to "inherit".
*
* Examples:
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "inherit",
* permissions: {
* net: "inherit",
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" })
* assertEquals(status.state, "granted");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "true",
* permissions: {
* net: true,
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" });
* assertEquals(status.state, "granted");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "false",
* permissions: {
* net: false,
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net" });
* assertEquals(status.state, "denied");
* },
* });
* ```
*
* ```ts
* import { assertEquals } from "https://deno.land/std/testing/asserts.ts";
*
* Deno.test({
* name: "localhost:8080",
* permissions: {
* net: ["localhost:8080"],
* },
* async fn() {
* const status = await Deno.permissions.query({ name: "net", host: "localhost:8080" });
* assertEquals(status.state, "granted");
* },
* });
* ```
*/
net?: "inherit" | boolean | string[];
/** Specifies if the `ffi` permission should be requested or revoked.
* If set to `"inherit"`, the current `ffi` permission will be inherited.
* If set to `true`, the global `ffi` permission will be requested.
* If set to `false`, the global `ffi` permission will be revoked.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `ffi` permission will be inherited.
* If set to `true`, the global `ffi` permission will be requested.
* If set to `false`, the global `ffi` permission will be revoked.
*
* Defaults to "inherit".
*/
ffi?: "inherit" | boolean;
/** Specifies if the `read` permission should be requested or revoked.
* If set to `"inherit"`, the current `read` permission will be inherited.
* If set to `true`, the global `read` permission will be requested.
* If set to `false`, the global `read` permission will be revoked.
* If set to `Array<string | URL>`, the `read` permission will be requested with the
* specified file paths.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `read` permission will be inherited.
* If set to `true`, the global `read` permission will be requested.
* If set to `false`, the global `read` permission will be revoked.
* If set to `Array<string | URL>`, the `read` permission will be requested with the
* specified file paths.
*
* Defaults to "inherit".
*/
read?: "inherit" | boolean | Array<string | URL>;
/** Specifies if the `run` permission should be requested or revoked.
* If set to `"inherit"`, the current `run` permission will be inherited.
* If set to `true`, the global `run` permission will be requested.
* If set to `false`, the global `run` permission will be revoked.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `run` permission will be inherited.
* If set to `true`, the global `run` permission will be requested.
* If set to `false`, the global `run` permission will be revoked.
*
* Defaults to "inherit".
*/
run?: "inherit" | boolean | Array<string | URL>;
/** Specifies if the `write` permission should be requested or revoked.
* If set to `"inherit"`, the current `write` permission will be inherited.
* If set to `true`, the global `write` permission will be requested.
* If set to `false`, the global `write` permission will be revoked.
* If set to `Array<string | URL>`, the `write` permission will be requested with the
* specified file paths.
*
* Defaults to "inherit".
*/
* If set to `"inherit"`, the current `write` permission will be inherited.
* If set to `true`, the global `write` permission will be requested.
* If set to `false`, the global `write` permission will be revoked.
* If set to `Array<string | URL>`, the `write` permission will be requested with the
* specified file paths.
*
* Defaults to "inherit".
*/
write?: "inherit" | boolean | Array<string | URL>;
};
}
@ -1335,27 +1333,27 @@ declare namespace Deno {
}
/** **UNSTABLE** New API, yet to be vetted.
*
* Create a TLS connection with an attached client certificate.
*
* ```ts
* const conn = await Deno.connectTls({
* hostname: "deno.land",
* port: 443,
* certChain: "---- BEGIN CERTIFICATE ----\n ...",
* privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
* });
* ```
*
* Requires `allow-net` permission.
*/
*
* Create a TLS connection with an attached client certificate.
*
* ```ts
* const conn = await Deno.connectTls({
* hostname: "deno.land",
* port: 443,
* certChain: "---- BEGIN CERTIFICATE ----\n ...",
* privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
* });
* ```
*
* Requires `allow-net` permission.
*/
export function connectTls(
options: ConnectTlsOptions & ConnectTlsClientCertOptions,
): Promise<Conn>;
export interface StartTlsOptions {
/** 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;

View file

@ -333,8 +333,8 @@
};
/**
* @type {typeof primordials.makeSafe}
*/
* @type {typeof primordials.makeSafe}
*/
const makeSafe = (unsafe, safe) => {
if (SymbolIterator in unsafe.prototype) {
const dummy = new unsafe();

View file

@ -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'";

View file

@ -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>;
}

View file

@ -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));

View file

@ -88,7 +88,6 @@ declare class URLSearchParams {
* console.log(value, key, parent);
* });
* ```
*
*/
forEach(
callbackfn: (value: string, key: string, parent: this) => void,

View file

@ -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.

View file

@ -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

View file

@ -38,7 +38,6 @@
#rid = null;
/**
*
* @param {string} label
* @param {TextDecoderOptions} options
*/
@ -198,7 +197,6 @@
#transform;
/**
*
* @param {string} label
* @param {TextDecoderOptions} options
*/

View file

@ -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'";

View file

@ -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>(

View file

@ -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

View file

@ -75,7 +75,7 @@
/**
* @param {string} permission
* @return {(boolean | string[])}
* */
*/
function parseArrayPermission(
value,
permission,

View file

@ -111,7 +111,6 @@
const statusCache = new Map();
/**
*
* @param {Deno.PermissionDescriptor} desc
* @param {Deno.PermissionState} state
* @returns {PermissionStatus}