diff --git a/types/node/assert.d.ts b/types/node/assert.d.ts index 9b7144eeefc029..c4cc77e432da08 100644 --- a/types/node/assert.d.ts +++ b/types/node/assert.d.ts @@ -1,8 +1,3 @@ -/** - * The `node:assert` module provides a set of assertion functions for verifying - * invariants. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js) - */ declare module "node:assert" { import strict = require("node:assert/strict"); /** diff --git a/types/node/assert/strict.d.ts b/types/node/assert/strict.d.ts index 51bb35201211b9..7a9dcf5714b860 100644 --- a/types/node/assert/strict.d.ts +++ b/types/node/assert/strict.d.ts @@ -1,49 +1,3 @@ -/** - * In strict assertion mode, non-strict methods behave like their corresponding - * strict methods. For example, `assert.deepEqual()` will behave like - * `assert.deepStrictEqual()`. - * - * In strict assertion mode, error messages for objects display a diff. In legacy - * assertion mode, error messages for objects display the objects, often truncated. - * - * To use strict assertion mode: - * - * ```js - * import { strict as assert } from 'node:assert'; - * ``` - * - * ```js - * import assert from 'node:assert/strict'; - * ``` - * - * Example error diff: - * - * ```js - * import { strict as assert } from 'node:assert'; - * - * assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]); - * // AssertionError: Expected inputs to be strictly deep-equal: - * // + actual - expected ... Lines skipped - * // - * // [ - * // [ - * // ... - * // 2, - * // + 3 - * // - '3' - * // ], - * // ... - * // 5 - * // ] - * ``` - * - * To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS` - * environment variables. This will also deactivate the colors in the REPL. For - * more on color support in terminal environments, read the tty - * [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation. - * @since v15.0.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js) - */ declare module "node:assert/strict" { import { Assert, diff --git a/types/node/async_hooks.d.ts b/types/node/async_hooks.d.ts index aa692c1060a5f2..bb82b8a3f0b16f 100644 --- a/types/node/async_hooks.d.ts +++ b/types/node/async_hooks.d.ts @@ -1,19 +1,3 @@ -/** - * We strongly discourage the use of the `async_hooks` API. - * Other APIs that can cover most of its use cases include: - * - * * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context - * * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources - * - * The `node:async_hooks` module provides an API to track asynchronous resources. - * It can be accessed using: - * - * ```js - * import async_hooks from 'node:async_hooks'; - * ``` - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js) - */ declare module "node:async_hooks" { /** * ```js @@ -123,37 +107,31 @@ declare module "node:async_hooks" { function triggerAsyncId(): number; interface HookCallbacks { /** - * Called when a class is constructed that has the possibility to emit an asynchronous event. - * @param asyncId A unique ID for the async resource - * @param type The type of the async resource - * @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created - * @param resource Reference to the resource representing the async operation, needs to be released during destroy + * The [`init` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource). */ init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void; /** - * When an asynchronous operation is initiated or completes a callback is called to notify the user. - * The before callback is called just before said callback is executed. - * @param asyncId the unique identifier assigned to the resource about to execute the callback. + * The [`before` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#beforeasyncid). */ before?(asyncId: number): void; /** - * Called immediately after the callback specified in `before` is completed. - * - * If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs. - * @param asyncId the unique identifier assigned to the resource which has executed the callback. + * The [`after` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#afterasyncid). */ after?(asyncId: number): void; /** - * Called when a promise has resolve() called. This may not be in the same execution id - * as the promise itself. - * @param asyncId the unique id for the promise that was resolve()d. + * The [`promiseResolve` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promiseresolveasyncid). */ promiseResolve?(asyncId: number): void; /** - * Called after the resource corresponding to asyncId is destroyed - * @param asyncId a unique ID for the async resource + * The [`destroy` callback](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#destroyasyncid). */ destroy?(asyncId: number): void; + /** + * Whether the hook should track `Promise`s. Cannot be `false` if + * `promiseResolve` is set. + * @default true + */ + trackPromises?: boolean | undefined; } interface AsyncHook { /** @@ -174,7 +152,8 @@ declare module "node:async_hooks" { * * All callbacks are optional. For example, if only resource cleanup needs to * be tracked, then only the `destroy` callback needs to be passed. The - * specifics of all functions that can be passed to `callbacks` is in the `Hook Callbacks` section. + * specifics of all functions that can be passed to `callbacks` is in the + * [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) section. * * ```js * import { createHook } from 'node:async_hooks'; @@ -202,12 +181,13 @@ declare module "node:async_hooks" { * ``` * * Because promises are asynchronous resources whose lifecycle is tracked - * via the async hooks mechanism, the `init()`, `before()`, `after()`, and`destroy()` callbacks _must not_ be async functions that return promises. + * via the async hooks mechanism, the `init()`, `before()`, `after()`, and + * `destroy()` callbacks _must not_ be async functions that return promises. * @since v8.1.0 - * @param callbacks The `Hook Callbacks` to register - * @return Instance used for disabling and enabling hooks + * @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#hook-callbacks) to register + * @returns Instance used for disabling and enabling hooks */ - function createHook(callbacks: HookCallbacks): AsyncHook; + function createHook(options: HookCallbacks): AsyncHook; interface AsyncResourceOptions { /** * The ID of the execution context that created this async event. diff --git a/types/node/buffer.buffer.d.ts b/types/node/buffer.buffer.d.ts index a3c23046ced397..a6c4b256c987aa 100644 --- a/types/node/buffer.buffer.d.ts +++ b/types/node/buffer.buffer.d.ts @@ -174,7 +174,7 @@ declare module "node:buffer" { * If `totalLength` is not provided, it is calculated from the `Buffer` instances * in `list` by adding their lengths. * - * If `totalLength` is provided, it is coerced to an unsigned integer. If the + * If `totalLength` is provided, it must be an unsigned integer. If the * combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is * truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is * less than `totalLength`, the remaining space is filled with zeros. diff --git a/types/node/buffer.d.ts b/types/node/buffer.d.ts index bb0f00441de594..7cff31fa790754 100644 --- a/types/node/buffer.d.ts +++ b/types/node/buffer.d.ts @@ -1,48 +1,3 @@ -/** - * `Buffer` objects are used to represent a fixed-length sequence of bytes. Many - * Node.js APIs support `Buffer`s. - * - * The `Buffer` class is a subclass of JavaScript's [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) class and - * extends it with methods that cover additional use cases. Node.js APIs accept - * plain [`Uint8Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) s wherever `Buffer`s are supported as well. - * - * While the `Buffer` class is available within the global scope, it is still - * recommended to explicitly reference it via an import or require statement. - * - * ```js - * import { Buffer } from 'node:buffer'; - * - * // Creates a zero-filled Buffer of length 10. - * const buf1 = Buffer.alloc(10); - * - * // Creates a Buffer of length 10, - * // filled with bytes which all have the value `1`. - * const buf2 = Buffer.alloc(10, 1); - * - * // Creates an uninitialized buffer of length 10. - * // This is faster than calling Buffer.alloc() but the returned - * // Buffer instance might contain old data that needs to be - * // overwritten using fill(), write(), or other functions that fill the Buffer's - * // contents. - * const buf3 = Buffer.allocUnsafe(10); - * - * // Creates a Buffer containing the bytes [1, 2, 3]. - * const buf4 = Buffer.from([1, 2, 3]); - * - * // Creates a Buffer containing the bytes [1, 1, 1, 1] – the entries - * // are all truncated using `(value & 255)` to fit into the range 0–255. - * const buf5 = Buffer.from([257, 257.5, -255, '1']); - * - * // Creates a Buffer containing the UTF-8-encoded bytes for the string 'tést': - * // [0x74, 0xc3, 0xa9, 0x73, 0x74] (in hexadecimal notation) - * // [116, 195, 169, 115, 116] (in decimal notation) - * const buf6 = Buffer.from('tést'); - * - * // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74]. - * const buf7 = Buffer.from('tést', 'latin1'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js) - */ declare module "node:buffer" { import { ReadableStream } from "node:stream/web"; /** diff --git a/types/node/child_process.d.ts b/types/node/child_process.d.ts index d71fed18def569..e3964ab96fba03 100644 --- a/types/node/child_process.d.ts +++ b/types/node/child_process.d.ts @@ -1,70 +1,3 @@ -/** - * The `node:child_process` module provides the ability to spawn subprocesses in - * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability - * is primarily provided by the {@link spawn} function: - * - * ```js - * import { spawn } from 'node:child_process'; - * import { once } from 'node:events'; - * const ls = spawn('ls', ['-lh', '/usr']); - * - * ls.stdout.on('data', (data) => { - * console.log(`stdout: ${data}`); - * }); - * - * ls.stderr.on('data', (data) => { - * console.error(`stderr: ${data}`); - * }); - * - * const [code] = await once(ls, 'close'); - * console.log(`child process exited with code ${code}`); - * ``` - * - * By default, pipes for `stdin`, `stdout`, and `stderr` are established between - * the parent Node.js process and the spawned subprocess. These pipes have - * limited (and platform-specific) capacity. If the subprocess writes to - * stdout in excess of that limit without the output being captured, the - * subprocess blocks, waiting for the pipe buffer to accept more data. This is - * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. - * - * The command lookup is performed using the `options.env.PATH` environment - * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is - * used. If `options.env` is set without `PATH`, lookup on Unix is performed - * on a default search path search of `/usr/bin:/bin` (see your operating system's - * manual for execvpe/execvp), on Windows the current processes environment - * variable `PATH` is used. - * - * On Windows, environment variables are case-insensitive. Node.js - * lexicographically sorts the `env` keys and uses the first one that - * case-insensitively matches. Only first (in lexicographic order) entry will be - * passed to the subprocess. This might lead to issues on Windows when passing - * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`. - * - * The {@link spawn} method spawns the child process asynchronously, - * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks - * the event loop until the spawned process either exits or is terminated. - * - * For convenience, the `node:child_process` module provides a handful of - * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on - * top of {@link spawn} or {@link spawnSync}. - * - * * {@link exec}: spawns a shell and runs a command within that - * shell, passing the `stdout` and `stderr` to a callback function when - * complete. - * * {@link execFile}: similar to {@link exec} except - * that it spawns the command directly without first spawning a shell by - * default. - * * {@link fork}: spawns a new Node.js process and invokes a - * specified module with an IPC communication channel established that allows - * sending messages between parent and child. - * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop. - * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop. - * - * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however, - * the synchronous methods can have significant impact on performance due to - * stalling the event loop while spawned processes complete. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/child_process.js) - */ declare module "node:child_process" { import { NonSharedBuffer } from "node:buffer"; import * as dgram from "node:dgram"; diff --git a/types/node/cluster.d.ts b/types/node/cluster.d.ts index 4e5efbfb54c106..80f55aeb71c91c 100644 --- a/types/node/cluster.d.ts +++ b/types/node/cluster.d.ts @@ -1,57 +1,3 @@ -/** - * Clusters of Node.js processes can be used to run multiple instances of Node.js - * that can distribute workloads among their application threads. When process isolation - * is not needed, use the [`worker_threads`](https://nodejs.org/docs/latest-v25.x/api/worker_threads.html) - * module instead, which allows running multiple application threads within a single Node.js instance. - * - * The cluster module allows easy creation of child processes that all share - * server ports. - * - * ```js - * import cluster from 'node:cluster'; - * import http from 'node:http'; - * import { availableParallelism } from 'node:os'; - * import process from 'node:process'; - * - * const numCPUs = availableParallelism(); - * - * if (cluster.isPrimary) { - * console.log(`Primary ${process.pid} is running`); - * - * // Fork workers. - * for (let i = 0; i < numCPUs; i++) { - * cluster.fork(); - * } - * - * cluster.on('exit', (worker, code, signal) => { - * console.log(`worker ${worker.process.pid} died`); - * }); - * } else { - * // Workers can share any TCP connection - * // In this case it is an HTTP server - * http.createServer((req, res) => { - * res.writeHead(200); - * res.end('hello world\n'); - * }).listen(8000); - * - * console.log(`Worker ${process.pid} started`); - * } - * ``` - * - * Running Node.js will now share port 8000 between the workers: - * - * ```console - * $ node server.js - * Primary 3596 is running - * Worker 4324 started - * Worker 4520 started - * Worker 6056 started - * Worker 5644 started - * ``` - * - * On Windows, it is not yet possible to set up a named pipe server in a worker. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/cluster.js) - */ declare module "node:cluster" { import * as child_process from "node:child_process"; import { EventEmitter, InternalEventEmitter } from "node:events"; diff --git a/types/node/console.d.ts b/types/node/console.d.ts index 394344214f86a7..b7f883363a1b6e 100644 --- a/types/node/console.d.ts +++ b/types/node/console.d.ts @@ -1,61 +1,3 @@ -/** - * The `node:console` module provides a simple debugging console that is similar to - * the JavaScript console mechanism provided by web browsers. - * - * The module exports two specific components: - * - * * A `Console` class with methods such as `console.log()`, `console.error()`, and `console.warn()` that can be used to write to any Node.js stream. - * * A global `console` instance configured to write to [`process.stdout`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdout) and - * [`process.stderr`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstderr). The global `console` can be used without importing the `node:console` module. - * - * _**Warning**_: The global console object's methods are neither consistently - * synchronous like the browser APIs they resemble, nor are they consistently - * asynchronous like all other Node.js streams. See the [`note on process I/O`](https://nodejs.org/docs/latest-v25.x/api/process.html#a-note-on-process-io) for - * more information. - * - * Example using the global `console`: - * - * ```js - * console.log('hello world'); - * // Prints: hello world, to stdout - * console.log('hello %s', 'world'); - * // Prints: hello world, to stdout - * console.error(new Error('Whoops, something bad happened')); - * // Prints error message and stack trace to stderr: - * // Error: Whoops, something bad happened - * // at [eval]:5:15 - * // at Script.runInThisContext (node:vm:132:18) - * // at Object.runInThisContext (node:vm:309:38) - * // at node:internal/process/execution:77:19 - * // at [eval]-wrapper:6:22 - * // at evalScript (node:internal/process/execution:76:60) - * // at node:internal/main/eval_string:23:3 - * - * const name = 'Will Robinson'; - * console.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to stderr - * ``` - * - * Example using the `Console` class: - * - * ```js - * const out = getStreamSomehow(); - * const err = getStreamSomehow(); - * const myConsole = new console.Console(out, err); - * - * myConsole.log('hello world'); - * // Prints: hello world, to out - * myConsole.log('hello %s', 'world'); - * // Prints: hello world, to out - * myConsole.error(new Error('Whoops, something bad happened')); - * // Prints: [Error: Whoops, something bad happened], to err - * - * const name = 'Will Robinson'; - * myConsole.warn(`Danger ${name}! Danger!`); - * // Prints: Danger Will Robinson! Danger!, to err - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/console.js) - */ declare module "node:console" { import { InspectOptions } from "node:util"; namespace console { diff --git a/types/node/constants.d.ts b/types/node/constants.d.ts index c24ad989a21e15..a271f9aaad1944 100644 --- a/types/node/constants.d.ts +++ b/types/node/constants.d.ts @@ -1,9 +1,3 @@ -/** - * @deprecated The `node:constants` module is deprecated. When requiring access to constants - * relevant to specific Node.js builtin modules, developers should instead refer - * to the `constants` property exposed by the relevant module. For instance, - * `require('node:fs').constants` and `require('node:os').constants`. - */ declare module "node:constants" { const constants: & typeof import("node:os").constants.dlopen diff --git a/types/node/crypto.d.ts b/types/node/crypto.d.ts index 15b46ce0dc87b8..3ebfec684c2cb7 100644 --- a/types/node/crypto.d.ts +++ b/types/node/crypto.d.ts @@ -1,21 +1,3 @@ -/** - * The `node:crypto` module provides cryptographic functionality that includes a - * set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify - * functions. - * - * ```js - * const { createHmac } = await import('node:crypto'); - * - * const secret = 'abcdefg'; - * const hash = createHmac('sha256', secret) - * .update('I love cupcakes') - * .digest('hex'); - * console.log(hash); - * // Prints: - * // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/crypto.js) - */ declare module "node:crypto" { import { NonSharedBuffer } from "node:buffer"; import * as stream from "node:stream"; diff --git a/types/node/dgram.d.ts b/types/node/dgram.d.ts index 3672e08b892151..8665497b4ef202 100644 --- a/types/node/dgram.d.ts +++ b/types/node/dgram.d.ts @@ -1,30 +1,3 @@ -/** - * The `node:dgram` module provides an implementation of UDP datagram sockets. - * - * ```js - * import dgram from 'node:dgram'; - * - * const server = dgram.createSocket('udp4'); - * - * server.on('error', (err) => { - * console.error(`server error:\n${err.stack}`); - * server.close(); - * }); - * - * server.on('message', (msg, rinfo) => { - * console.log(`server got: ${msg} from ${rinfo.address}:${rinfo.port}`); - * }); - * - * server.on('listening', () => { - * const address = server.address(); - * console.log(`server listening ${address.address}:${address.port}`); - * }); - * - * server.bind(41234); - * // Prints: server listening 0.0.0.0:41234 - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dgram.js) - */ declare module "node:dgram" { import { NonSharedBuffer } from "node:buffer"; import * as dns from "node:dns"; diff --git a/types/node/diagnostics_channel.d.ts b/types/node/diagnostics_channel.d.ts index 206592bd0392fe..fa8361272e6c75 100644 --- a/types/node/diagnostics_channel.d.ts +++ b/types/node/diagnostics_channel.d.ts @@ -1,27 +1,3 @@ -/** - * The `node:diagnostics_channel` module provides an API to create named channels - * to report arbitrary message data for diagnostics purposes. - * - * It can be accessed using: - * - * ```js - * import diagnostics_channel from 'node:diagnostics_channel'; - * ``` - * - * It is intended that a module writer wanting to report diagnostics messages - * will create one or many top-level channels to report messages through. - * Channels may also be acquired at runtime but it is not encouraged - * due to the additional overhead of doing so. Channels may be exported for - * convenience, but as long as the name is known it can be acquired anywhere. - * - * If you intend for your module to produce diagnostics data for others to - * consume it is recommended that you include documentation of what named - * channels are used along with the shape of the message data. Channel names - * should generally include the module name to avoid collisions with data from - * other modules. - * @since v15.1.0, v14.17.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/diagnostics_channel.js) - */ declare module "node:diagnostics_channel" { import { AsyncLocalStorage } from "node:async_hooks"; /** diff --git a/types/node/dns.d.ts b/types/node/dns.d.ts index 80a2272c76068b..2e0941e58e1c3c 100644 --- a/types/node/dns.d.ts +++ b/types/node/dns.d.ts @@ -1,49 +1,3 @@ -/** - * The `node:dns` module enables name resolution. For example, use it to look up IP - * addresses of host names. - * - * Although named for the [Domain Name System (DNS)](https://en.wikipedia.org/wiki/Domain_Name_System), it does not always use the - * DNS protocol for lookups. {@link lookup} uses the operating system - * facilities to perform name resolution. It may not need to perform any network - * communication. To perform name resolution the way other applications on the same - * system do, use {@link lookup}. - * - * ```js - * import dns from 'node:dns'; - * - * dns.lookup('example.org', (err, address, family) => { - * console.log('address: %j family: IPv%s', address, family); - * }); - * // address: "93.184.216.34" family: IPv4 - * ``` - * - * All other functions in the `node:dns` module connect to an actual DNS server to - * perform name resolution. They will always use the network to perform DNS - * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform - * DNS queries, bypassing other name-resolution facilities. - * - * ```js - * import dns from 'node:dns'; - * - * dns.resolve4('archive.org', (err, addresses) => { - * if (err) throw err; - * - * console.log(`addresses: ${JSON.stringify(addresses)}`); - * - * addresses.forEach((a) => { - * dns.reverse(a, (err, hostnames) => { - * if (err) { - * throw err; - * } - * console.log(`reverse for ${a}: ${JSON.stringify(hostnames)}`); - * }); - * }); - * }); - * ``` - * - * See the [Implementation considerations section](https://nodejs.org/docs/latest-v25.x/api/dns.html#implementation-considerations) for more information. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/dns.js) - */ declare module "node:dns" { // Supported getaddrinfo flags. /** diff --git a/types/node/dns/promises.d.ts b/types/node/dns/promises.d.ts index 8d5f98989b1a7c..b9e091caf47394 100644 --- a/types/node/dns/promises.d.ts +++ b/types/node/dns/promises.d.ts @@ -1,9 +1,3 @@ -/** - * The `dns.promises` API provides an alternative set of asynchronous DNS methods - * that return `Promise` objects rather than using callbacks. The API is accessible - * via `import { promises as dnsPromises } from 'node:dns'` or `import dnsPromises from 'node:dns/promises'`. - * @since v10.6.0 - */ declare module "node:dns/promises" { import { AnyRecord, diff --git a/types/node/domain.d.ts b/types/node/domain.d.ts index 24a098140a6c64..8e03a7d6db6ea2 100644 --- a/types/node/domain.d.ts +++ b/types/node/domain.d.ts @@ -1,19 +1,3 @@ -/** - * **This module is pending deprecation.** Once a replacement API has been - * finalized, this module will be fully deprecated. Most developers should - * **not** have cause to use this module. Users who absolutely must have - * the functionality that domains provide may rely on it for the time being - * but should expect to have to migrate to a different solution - * in the future. - * - * Domains provide a way to handle multiple different IO operations as a - * single group. If any of the event emitters or callbacks registered to a - * domain emit an `'error'` event, or throw an error, then the domain object - * will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to - * exit immediately with an error code. - * @deprecated Since v1.4.2 - Deprecated - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/domain.js) - */ declare module "node:domain" { import { EventEmitter } from "node:events"; /** diff --git a/types/node/events.d.ts b/types/node/events.d.ts index 6870cf5b1388dc..b4cd8c3d41dbe6 100644 --- a/types/node/events.d.ts +++ b/types/node/events.d.ts @@ -1,39 +1,3 @@ -/** - * Much of the Node.js core API is built around an idiomatic asynchronous - * event-driven architecture in which certain kinds of objects (called "emitters") - * emit named events that cause `Function` objects ("listeners") to be called. - * - * For instance: a `net.Server` object emits an event each time a peer - * connects to it; a `fs.ReadStream` emits an event when the file is opened; - * a `stream` emits an event whenever data is available to be read. - * - * All objects that emit events are instances of the `EventEmitter` class. These - * objects expose an `eventEmitter.on()` function that allows one or more - * functions to be attached to named events emitted by the object. Typically, - * event names are camel-cased strings but any valid JavaScript property key - * can be used. - * - * When the `EventEmitter` object emits an event, all of the functions attached - * to that specific event are called _synchronously_. Any values returned by the - * called listeners are _ignored_ and discarded. - * - * The following example shows a simple `EventEmitter` instance with a single - * listener. The `eventEmitter.on()` method is used to register listeners, while - * the `eventEmitter.emit()` method is used to trigger the event. - * - * ```js - * import { EventEmitter } from 'node:events'; - * - * class MyEmitter extends EventEmitter {} - * - * const myEmitter = new MyEmitter(); - * myEmitter.on('event', () => { - * console.log('an event occurred!'); - * }); - * myEmitter.emit('event'); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/events.js) - */ declare module "node:events" { import { AsyncResource, AsyncResourceOptions } from "node:async_hooks"; // #region Event map helpers diff --git a/types/node/fs.d.ts b/types/node/fs.d.ts index 4e16bbc7aaa95c..b74033c8d504e3 100644 --- a/types/node/fs.d.ts +++ b/types/node/fs.d.ts @@ -1,23 +1,3 @@ -/** - * The `node:fs` module enables interacting with the file system in a - * way modeled on standard POSIX functions. - * - * To use the promise-based APIs: - * - * ```js - * import * as fs from 'node:fs/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as fs from 'node:fs'; - * ``` - * - * All file system operations have synchronous, callback, and promise-based - * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM). - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/fs.js) - */ declare module "node:fs" { import { NonSharedBuffer } from "node:buffer"; import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; diff --git a/types/node/fs/promises.d.ts b/types/node/fs/promises.d.ts index e4d249d9924193..419112a5b6ada1 100644 --- a/types/node/fs/promises.d.ts +++ b/types/node/fs/promises.d.ts @@ -1,13 +1,3 @@ -/** - * The `fs/promises` API provides asynchronous file system methods that return - * promises. - * - * The promise APIs use the underlying Node.js threadpool to perform file - * system operations off the event loop thread. These operations are not - * synchronized or threadsafe. Care must be taken when performing multiple - * concurrent modifications on the same file or data corruption may occur. - * @since v10.0.0 - */ declare module "node:fs/promises" { import { NonSharedBuffer } from "node:buffer"; import { Abortable } from "node:events"; diff --git a/types/node/http.d.ts b/types/node/http.d.ts index f88f49f54a963c..c2e00e7c2fce77 100644 --- a/types/node/http.d.ts +++ b/types/node/http.d.ts @@ -1,44 +1,3 @@ -/** - * To use the HTTP server and client one must import the `node:http` module. - * - * The HTTP interfaces in Node.js are designed to support many features - * of the protocol which have been traditionally difficult to use. - * In particular, large, possibly chunk-encoded, messages. The interface is - * careful to never buffer entire requests or responses, so the - * user is able to stream data. - * - * HTTP message headers are represented by an object like this: - * - * ```json - * { "content-length": "123", - * "content-type": "text/plain", - * "connection": "keep-alive", - * "host": "example.com", - * "accept": "*" } - * ``` - * - * Keys are lowercased. Values are not modified. - * - * In order to support the full spectrum of possible HTTP applications, the Node.js - * HTTP API is very low-level. It deals with stream handling and message - * parsing only. It parses a message into headers and body but it does not - * parse the actual headers or the body. - * - * See `message.headers` for details on how duplicate headers are handled. - * - * The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For - * example, the previous message header object might have a `rawHeaders` list like the following: - * - * ```js - * [ 'ConTent-Length', '123456', - * 'content-LENGTH', '123', - * 'content-type', 'text/plain', - * 'CONNECTION', 'keep-alive', - * 'Host', 'example.com', - * 'accepT', '*' ] - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js) - */ declare module "node:http" { import { NonSharedBuffer } from "node:buffer"; import { LookupOptions } from "node:dns"; diff --git a/types/node/http2.d.ts b/types/node/http2.d.ts index 4130bfe2e04a4f..b2fcc591ba9e36 100644 --- a/types/node/http2.d.ts +++ b/types/node/http2.d.ts @@ -1,13 +1,3 @@ -/** - * The `node:http2` module provides an implementation of the [HTTP/2](https://tools.ietf.org/html/rfc7540) protocol. - * It can be accessed using: - * - * ```js - * import http2 from 'node:http2'; - * ``` - * @since v8.4.0 - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http2.js) - */ declare module "node:http2" { import { NonSharedBuffer } from "node:buffer"; import { InternalEventEmitter } from "node:events"; diff --git a/types/node/https.d.ts b/types/node/https.d.ts index 6b025690f351b0..b10aad0c28c574 100644 --- a/types/node/https.d.ts +++ b/types/node/https.d.ts @@ -1,8 +1,3 @@ -/** - * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a - * separate module. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/https.js) - */ declare module "node:https" { import * as http from "node:http"; import { Duplex } from "node:stream"; diff --git a/types/node/inspector.d.ts b/types/node/inspector.d.ts index 34140df6dc6ec3..cf385b76dc1587 100644 --- a/types/node/inspector.d.ts +++ b/types/node/inspector.d.ts @@ -1,8 +1,3 @@ -/** - * The `node:inspector` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector.js) - */ declare module "node:inspector" { import { EventEmitter } from "node:events"; /** diff --git a/types/node/inspector/promises.d.ts b/types/node/inspector/promises.d.ts index 54e12506673e78..e75ff20a354957 100644 --- a/types/node/inspector/promises.d.ts +++ b/types/node/inspector/promises.d.ts @@ -1,9 +1,3 @@ -/** - * The `node:inspector/promises` module provides an API for interacting with the V8 - * inspector. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js) - * @since v19.0.0 - */ declare module "node:inspector/promises" { import { EventEmitter } from "node:events"; export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector"; diff --git a/types/node/module.d.ts b/types/node/module.d.ts index 6a8e339c17aa9c..7f61a678e67fc0 100644 --- a/types/node/module.d.ts +++ b/types/node/module.d.ts @@ -1,6 +1,3 @@ -/** - * @since v0.3.7 - */ declare module "node:module" { import { URL } from "node:url"; class Module { diff --git a/types/node/net.d.ts b/types/node/net.d.ts index a104853b1ad8d8..bb6d3a3930a956 100644 --- a/types/node/net.d.ts +++ b/types/node/net.d.ts @@ -1,17 +1,3 @@ -/** - * > Stability: 2 - Stable - * - * The `node:net` module provides an asynchronous network API for creating stream-based - * TCP or `IPC` servers ({@link createServer}) and clients - * ({@link createConnection}). - * - * It can be accessed using: - * - * ```js - * import net from 'node:net'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/net.js) - */ declare module "node:net" { import { NonSharedBuffer } from "node:buffer"; import * as dns from "node:dns"; @@ -38,6 +24,7 @@ declare module "node:net" { keepAlive?: boolean | undefined; keepAliveInitialDelay?: number | undefined; blockList?: BlockList | undefined; + typeOfService?: number | undefined; } interface OnReadOpts { buffer: Uint8Array | (() => Uint8Array); @@ -231,6 +218,37 @@ declare module "node:net" { * @return The socket itself. */ setKeepAlive(enable?: boolean, initialDelay?: number): this; + /** + * Returns the current Type of Service (TOS) field for IPv4 packets or Traffic + * Class for IPv6 packets for this socket. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @returns The current TOS value. + */ + getTypeOfService(): number; + /** + * Sets the Type of Service (TOS) field for IPv4 packets or Traffic Class for IPv6 + * Packets sent from this socket. This can be used to prioritize network traffic. + * + * `setTypeOfService()` may be called before the socket is connected; the value + * will be cached and applied when the socket establishes a connection. + * `getTypeOfService()` will return the currently set value even before connection. + * + * On some platforms (e.g., Linux), certain TOS/ECN bits may be masked or ignored, + * and behavior can differ between IPv4 and IPv6 or dual-stack sockets. Callers + * should verify platform-specific semantics. + * @since v25.6.0 + * @param tos The TOS value to set (0-255). + * @returns The socket itself. + */ + setTypeOfService(tos: number): this; /** * Returns the bound `address`, the address `family` name and `port` of the * socket as reported by the operating system:`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }` diff --git a/types/node/node-tests/async_hooks.ts b/types/node/node-tests/async_hooks.ts index 588825e35c4fc3..99c96b5a31e21e 100644 --- a/types/node/node-tests/async_hooks.ts +++ b/types/node/node-tests/async_hooks.ts @@ -16,6 +16,7 @@ import { after() {}, destroy() {}, promiseResolve() {}, + trackPromises: true, }; const asyncHook = createHook(hooks); diff --git a/types/node/node-tests/net.ts b/types/node/node-tests/net.ts index 172411925e294e..8d95b8e5c74450 100644 --- a/types/node/node-tests/net.ts +++ b/types/node/node-tests/net.ts @@ -64,6 +64,7 @@ import * as net from "node:net"; keepAliveInitialDelay: 1000, noDelay: false, blockList: new net.BlockList(), + typeOfService: 0b00000111, }); let bool: boolean; @@ -451,6 +452,16 @@ import * as net from "node:net"; }); } +{ + const socket = new net.Socket(); + + // $ExpectType number + socket.getTypeOfService(); + + // $ExpectType Socket + socket.setTypeOfService(0b00000111); +} + { const sockAddr: net.SocketAddress = new net.SocketAddress({ address: "123.123.123.123", diff --git a/types/node/node-tests/stream.ts b/types/node/node-tests/stream.ts index 705b92856726d1..69cb4450ca2f1f 100644 --- a/types/node/node-tests/stream.ts +++ b/types/node/node-tests/stream.ts @@ -498,6 +498,8 @@ async function testConsumers() { await consumers.blob(consumable); // $ExpectType NonSharedBuffer await consumers.buffer(consumable); + // $ExpectType NonSharedUint8Array + await consumers.bytes(consumable); // $ExpectType unknown await consumers.json(consumable); // $ExpectType string diff --git a/types/node/node-tests/test.ts b/types/node/node-tests/test.ts index de79564145bb14..9d2585da1b1bfe 100644 --- a/types/node/node-tests/test.ts +++ b/types/node/node-tests/test.ts @@ -69,6 +69,9 @@ run({ branchCoverage: 50, functionCoverage: 80, rerunFailuresFilePath: "/path/to/file.json", + env: { + MY_TEST_PATH: "/path/to/tests", + }, }); // TestsStream should be a NodeJS.ReadableStream diff --git a/types/node/node-tests/tls.ts b/types/node/node-tests/tls.ts index b0186d18511f4a..47cd796d22b6b2 100644 --- a/types/node/node-tests/tls.ts +++ b/types/node/node-tests/tls.ts @@ -40,6 +40,7 @@ import { psk: Buffer.from("asd"), }; }, + requestOCSP: true, }; const tlsSocket = connect(connOpts); diff --git a/types/node/os.d.ts b/types/node/os.d.ts index db86e9b324b9cb..562c463ba1201a 100644 --- a/types/node/os.d.ts +++ b/types/node/os.d.ts @@ -1,12 +1,3 @@ -/** - * The `node:os` module provides operating system-related utility methods and - * properties. It can be accessed using: - * - * ```js - * import os from 'node:os'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/os.js) - */ declare module "node:os" { import { NonSharedBuffer } from "buffer"; interface CpuInfo { diff --git a/types/node/package.json b/types/node/package.json index 937f11915a9174..f40218da2ed75f 100644 --- a/types/node/package.json +++ b/types/node/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/node", - "version": "25.5.9999", + "version": "25.6.9999", "nonNpm": "conflict", "nonNpmDescription": "Node.js", "projects": [ @@ -18,7 +18,7 @@ } }, "dependencies": { - "undici-types": "~7.18.0" + "undici-types": "~7.19.0" }, "devDependencies": { "@types/node": "workspace:." diff --git a/types/node/path.d.ts b/types/node/path.d.ts index c0b22f686b63cb..ae8fd973fd96a6 100644 --- a/types/node/path.d.ts +++ b/types/node/path.d.ts @@ -1,12 +1,3 @@ -/** - * The `node:path` module provides utilities for working with file and directory - * paths. It can be accessed using: - * - * ```js - * import path from 'node:path'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/path.js) - */ declare module "node:path" { namespace path { /** diff --git a/types/node/perf_hooks.d.ts b/types/node/perf_hooks.d.ts index 4dd063284a53b7..46e725c314c53a 100644 --- a/types/node/perf_hooks.d.ts +++ b/types/node/perf_hooks.d.ts @@ -1,34 +1,3 @@ -/** - * This module provides an implementation of a subset of the W3C [Web Performance APIs](https://w3c.github.io/perf-timing-primer/) as well as additional APIs for - * Node.js-specific performance measurements. - * - * Node.js supports the following [Web Performance APIs](https://w3c.github.io/perf-timing-primer/): - * - * * [High Resolution Time](https://www.w3.org/TR/hr-time-2) - * * [Performance Timeline](https://w3c.github.io/performance-timeline/) - * * [User Timing](https://www.w3.org/TR/user-timing/) - * * [Resource Timing](https://www.w3.org/TR/resource-timing-2/) - * - * ```js - * import { PerformanceObserver, performance } from 'node:perf_hooks'; - * - * const obs = new PerformanceObserver((items) => { - * console.log(items.getEntries()[0].duration); - * performance.clearMarks(); - * }); - * obs.observe({ type: 'measure' }); - * performance.measure('Start to Now'); - * - * performance.mark('A'); - * doSomeLongRunningProcess(() => { - * performance.measure('A to Now', 'A'); - * - * performance.mark('B'); - * performance.measure('A to B', 'A', 'B'); - * }); - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/perf_hooks.js) - */ declare module "node:perf_hooks" { import { InternalEventTargetEventProperties } from "node:events"; // #region web types diff --git a/types/node/punycode.d.ts b/types/node/punycode.d.ts index d293553f71ea8f..87fdec970362b0 100644 --- a/types/node/punycode.d.ts +++ b/types/node/punycode.d.ts @@ -1,31 +1,3 @@ -/** - * **The version of the punycode module bundled in Node.js is being deprecated. **In a future major version of Node.js this module will be removed. Users - * currently depending on the `punycode` module should switch to using the - * userland-provided [Punycode.js](https://github.com/bestiejs/punycode.js) module instead. For punycode-based URL - * encoding, see `url.domainToASCII` or, more generally, the `WHATWG URL API`. - * - * The `punycode` module is a bundled version of the [Punycode.js](https://github.com/bestiejs/punycode.js) module. It - * can be accessed using: - * - * ```js - * import punycode from 'node:punycode'; - * ``` - * - * [Punycode](https://tools.ietf.org/html/rfc3492) is a character encoding scheme defined by RFC 3492 that is - * primarily intended for use in Internationalized Domain Names. Because host - * names in URLs are limited to ASCII characters only, Domain Names that contain - * non-ASCII characters must be converted into ASCII using the Punycode scheme. - * For instance, the Japanese character that translates into the English word, `'example'` is `'例'`. The Internationalized Domain Name, `'例.com'` (equivalent - * to `'example.com'`) is represented by Punycode as the ASCII string `'xn--fsq.com'`. - * - * The `punycode` module provides a simple implementation of the Punycode standard. - * - * The `punycode` module is a third-party dependency used by Node.js and - * made available to developers as a convenience. Fixes or other modifications to - * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project. - * @deprecated - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/punycode.js) - */ declare module "node:punycode" { /** * The `punycode.decode()` method converts a [Punycode](https://tools.ietf.org/html/rfc3492) string of ASCII-only diff --git a/types/node/querystring.d.ts b/types/node/querystring.d.ts index dc421bcc6b4e9e..6d821a4e06be58 100644 --- a/types/node/querystring.d.ts +++ b/types/node/querystring.d.ts @@ -1,16 +1,3 @@ -/** - * The `node:querystring` module provides utilities for parsing and formatting URL - * query strings. It can be accessed using: - * - * ```js - * import querystring from 'node:querystring'; - * ``` - * - * `querystring` is more performant than `URLSearchParams` but is not a - * standardized API. Use `URLSearchParams` when performance is not critical or - * when compatibility with browser code is desirable. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/querystring.js) - */ declare module "node:querystring" { interface StringifyOptions { /** diff --git a/types/node/quic.d.ts b/types/node/quic.d.ts index 9a6fd97ea1d49e..7fe6188d187079 100644 --- a/types/node/quic.d.ts +++ b/types/node/quic.d.ts @@ -1,16 +1,3 @@ -/** - * The 'node:quic' module provides an implementation of the QUIC protocol. - * To access it, start Node.js with the `--experimental-quic` option and: - * - * ```js - * import quic from 'node:quic'; - * ``` - * - * The module is only available under the `node:` scheme. - * @since v23.8.0 - * @experimental - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/quic.js) - */ declare module "node:quic" { import { KeyObject, webcrypto } from "node:crypto"; import { SocketAddress } from "node:net"; diff --git a/types/node/readline.d.ts b/types/node/readline.d.ts index 9e3714fde46532..5042975a79b55e 100644 --- a/types/node/readline.d.ts +++ b/types/node/readline.d.ts @@ -1,38 +1,3 @@ -/** - * The `node:readline` module provides an interface for reading data from a [Readable](https://nodejs.org/docs/latest-v25.x/api/stream.html#readable-streams) stream - * (such as [`process.stdin`](https://nodejs.org/docs/latest-v25.x/api/process.html#processstdin)) one line at a time. - * - * To use the promise-based APIs: - * - * ```js - * import * as readline from 'node:readline/promises'; - * ``` - * - * To use the callback and sync APIs: - * - * ```js - * import * as readline from 'node:readline'; - * ``` - * - * The following simple example illustrates the basic use of the `node:readline` module. - * - * ```js - * import * as readline from 'node:readline/promises'; - * import { stdin as input, stdout as output } from 'node:process'; - * - * const rl = readline.createInterface({ input, output }); - * - * const answer = await rl.question('What do you think of Node.js? '); - * - * console.log(`Thank you for your valuable feedback: ${answer}`); - * - * rl.close(); - * ``` - * - * Once this code is invoked, the Node.js application will not terminate until the `readline.Interface` is closed because the interface waits for data to be - * received on the `input` stream. - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/readline.js) - */ declare module "node:readline" { import { Abortable, EventEmitter, InternalEventEmitter } from "node:events"; interface Key { diff --git a/types/node/readline/promises.d.ts b/types/node/readline/promises.d.ts index f449e1bbc85ad5..ccee49037635bf 100644 --- a/types/node/readline/promises.d.ts +++ b/types/node/readline/promises.d.ts @@ -1,6 +1,3 @@ -/** - * @since v17.0.0 - */ declare module "node:readline/promises" { import { Abortable } from "node:events"; import { diff --git a/types/node/repl.d.ts b/types/node/repl.d.ts index 2d06294f2a11a7..7481bead57902b 100644 --- a/types/node/repl.d.ts +++ b/types/node/repl.d.ts @@ -1,13 +1,3 @@ -/** - * The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation - * that is available both as a standalone program or includible in other - * applications. It can be accessed using: - * - * ```js - * import repl from 'node:repl'; - * ``` - * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/repl.js) - */ declare module "node:repl" { import { AsyncCompleter, Completer, Interface, InterfaceEventMap } from "node:readline"; import { InspectOptions } from "node:util"; diff --git a/types/node/scripts/generate-docs/ast-processing.ts b/types/node/scripts/generate-docs/ast-processing.ts index f778318a4d4dae..ce7516c9fa9968 100644 --- a/types/node/scripts/generate-docs/ast-processing.ts +++ b/types/node/scripts/generate-docs/ast-processing.ts @@ -16,7 +16,6 @@ import { isTypeLiteralNode, JSDocParameterTag, JSDocReturnTag, - JSDocSeeTag, JSDocTag, JSDocUnknownTag, MethodDeclaration, @@ -29,13 +28,7 @@ import { TransformationContext, TypeChecker, } from "typescript"; -import { - getIndent, - getPropertyName, - isNamedModuleDeclaration, - nodeWarning, - removeCommentsRecursive, -} from "./ast-utils"; +import { getIndent, getPropertyName, nodeWarning, removeCommentsRecursive } from "./ast-utils"; import { fixupHtmlDocs, fixupLocalLinks } from "./html-doc-processing"; import { ClassDocNode, MethodDocNode, ModuleDocNode, PropertyDocNode, SignatureDocNode } from "./node-doc-processing"; import { contextDeduper, replaceLineBreaks, wordWrap } from "./utils"; @@ -149,15 +142,6 @@ class TagHelper { return this.createUnknownTag("legacy", this.fixupCommentFormatting(text, "legacy")); } - createSeeLinkTag(url: string, text: string): JSDocSeeTag { - const { factory } = this.docContext.transformationContext; - return this.docContext.transformationContext.factory.createJSDocSeeTag( - factory.createIdentifier("see"), - undefined, - `[${text}](${url})`, - ); - } - private createReturnTag(text: string): JSDocReturnTag { const { factory } = this.docContext.transformationContext; return factory.createJSDocReturnTag( @@ -402,31 +386,6 @@ export class NodeProcessingContext { }; } - /** - * Processes named module declarations. - */ - private handleModuleDeclaration(): JSDocResult { - const { moduleDocs } = this.context; - const tags = this.tagHelper.extractCommonTags(moduleDocs, moduleDocs.name); - - // Get rid of bloaty source label - let desc = moduleDocs.desc ?? ""; - const removeSourceRegex = /