mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
feat(fmt): add basic JS doc formatting (#11902)
This commit is contained in:
parent
1bf7b90ca8
commit
987716798f
19 changed files with 260 additions and 271 deletions
|
@ -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
16
Cargo.lock
generated
|
@ -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",
|
||||
|
|
|
@ -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"
|
||||
|
|
18
cli/dts/lib.deno.ns.d.ts
vendored
18
cli/dts/lib.deno.ns.d.ts
vendored
|
@ -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`.
|
||||
*
|
||||
|
|
4
cli/dts/lib.deno.shared_globals.d.ts
vendored
4
cli/dts/lib.deno.shared_globals.d.ts
vendored
|
@ -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. */
|
||||
|
|
2
cli/dts/lib.deno.unstable.d.ts
vendored
2
cli/dts/lib.deno.unstable.d.ts
vendored
|
@ -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;
|
||||
|
||||
|
|
1
ext/url/lib.deno_url.d.ts
vendored
1
ext/url/lib.deno_url.d.ts
vendored
|
@ -88,7 +88,6 @@ declare class URLSearchParams {
|
|||
* console.log(value, key, parent);
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
forEach(
|
||||
callbackfn: (value: string, key: string, parent: this) => void,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#rid = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} label
|
||||
* @param {TextDecoderOptions} options
|
||||
*/
|
||||
|
@ -198,7 +197,6 @@
|
|||
#transform;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} label
|
||||
* @param {TextDecoderOptions} options
|
||||
*/
|
||||
|
|
|
@ -544,7 +544,6 @@
|
|||
const _message = Symbol("[[message]]");
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string | undefined} reason
|
||||
* @param {string} message
|
||||
* @returns {GPUDeviceLostInfo}
|
||||
|
@ -3377,7 +3376,6 @@
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} x
|
||||
* @param {number} y
|
||||
* @param {number} width
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
/**
|
||||
* @param {string} permission
|
||||
* @return {(boolean | string[])}
|
||||
* */
|
||||
*/
|
||||
function parseArrayPermission(
|
||||
value,
|
||||
permission,
|
||||
|
|
|
@ -111,7 +111,6 @@
|
|||
const statusCache = new Map();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {Deno.PermissionDescriptor} desc
|
||||
* @param {Deno.PermissionState} state
|
||||
* @returns {PermissionStatus}
|
||||
|
|
Loading…
Add table
Reference in a new issue