@types/node 25.9.4 → 26.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node v25.9/README.md → node/README.md +2 -2
- node v25.9/assert/strict.d.ts → node/assert/strict.d.ts +10 -1
- node v25.9/assert.d.ts → node/assert.d.ts +144 -17
- node v25.9/async_hooks.d.ts → node/async_hooks.d.ts +9 -9
- node v25.9/buffer.d.ts → node/buffer.d.ts +0 -5
- node v25.9/child_process.d.ts → node/child_process.d.ts +17 -21
- node v25.9/cluster.d.ts → node/cluster.d.ts +13 -13
- node v25.9/console.d.ts → node/console.d.ts +1 -1
- node v25.9/crypto.d.ts → node/crypto.d.ts +454 -571
- node v25.9/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +37 -29
- node v25.9/dns.d.ts → node/dns.d.ts +14 -14
- node v25.9/events.d.ts → node/events.d.ts +3 -3
- node v25.9/fs/promises.d.ts → node/fs/promises.d.ts +4 -4
- node v25.9/fs.d.ts → node/fs.d.ts +3 -12
- node v25.9/globals.d.ts → node/globals.d.ts +4 -4
- node v25.9/http.d.ts → node/http.d.ts +5 -5
- node v25.9/http2.d.ts → node/http2.d.ts +1 -1
- node v25.9/index.d.ts → node/index.d.ts +0 -3
- node v25.9/inspector.d.ts → node/inspector.d.ts +1 -1
- node v25.9/module.d.ts → node/module.d.ts +16 -45
- node v25.9/net.d.ts → node/net.d.ts +1 -1
- node v25.9/os.d.ts → node/os.d.ts +2 -2
- node v25.9/package.json → node/package.json +3 -3
- node v25.9/perf_hooks.d.ts → node/perf_hooks.d.ts +1 -9
- node v25.9/process.d.ts → node/process.d.ts +9 -11
- node v25.9/readline.d.ts → node/readline.d.ts +12 -11
- node v25.9/repl.d.ts → node/repl.d.ts +10 -10
- node v25.9/sqlite.d.ts → node/sqlite.d.ts +1 -1
- node v25.9/stream/promises.d.ts → node/stream/promises.d.ts +2 -2
- node v25.9/stream/web.d.ts → node/stream/web.d.ts +1 -1
- node v25.9/stream.d.ts → node/stream.d.ts +5 -5
- node v25.9/test/reporters.d.ts → node/test/reporters.d.ts +1 -1
- node v25.9/test.d.ts → node/test.d.ts +8 -8
- node v25.9/tls.d.ts → node/tls.d.ts +1 -1
- node v25.9/ts5.6/index.d.ts → node/ts5.6/index.d.ts +1 -4
- node v25.9/ts5.7/index.d.ts → node/ts5.7/index.d.ts +0 -3
- node v25.9/url.d.ts → node/url.d.ts +3 -3
- node v25.9/util/types.d.ts → node/util/types.d.ts +1 -1
- node v25.9/util.d.ts → node/util.d.ts +3 -20
- node v25.9/v8.d.ts → node/v8.d.ts +1 -1
- node v25.9/vm.d.ts → node/vm.d.ts +9 -9
- node v25.9/web-globals/domexception.d.ts → node/web-globals/domexception.d.ts +15 -0
- node v25.9/worker_threads.d.ts → node/worker_threads.d.ts +2 -5
- node v25.9/zlib.d.ts → node/zlib.d.ts +3 -3
- node v25.9/compatibility/iterators.d.ts +0 -21
- {node v25.9 → node}/LICENSE +0 -0
- {node v25.9 → node}/buffer.buffer.d.ts +0 -0
- {node v25.9 → node}/constants.d.ts +0 -0
- {node v25.9 → node}/dgram.d.ts +0 -0
- {node v25.9 → node}/dns/promises.d.ts +0 -0
- {node v25.9 → node}/domain.d.ts +0 -0
- {node v25.9 → node}/globals.typedarray.d.ts +0 -0
- {node v25.9 → node}/https.d.ts +0 -0
- {node v25.9 → node}/inspector/promises.d.ts +0 -0
- {node v25.9 → node}/inspector.generated.d.ts +0 -0
- {node v25.9 → node}/path/posix.d.ts +0 -0
- {node v25.9 → node}/path/win32.d.ts +0 -0
- {node v25.9 → node}/path.d.ts +0 -0
- {node v25.9 → node}/punycode.d.ts +0 -0
- {node v25.9 → node}/querystring.d.ts +0 -0
- {node v25.9 → node}/quic.d.ts +0 -0
- {node v25.9 → node}/readline/promises.d.ts +0 -0
- {node v25.9 → node}/sea.d.ts +0 -0
- {node v25.9 → node}/stream/consumers.d.ts +0 -0
- {node v25.9 → node}/stream/iter.d.ts +0 -0
- {node v25.9 → node}/string_decoder.d.ts +0 -0
- {node v25.9 → node}/timers/promises.d.ts +0 -0
- {node v25.9 → node}/timers.d.ts +0 -0
- {node v25.9 → node}/trace_events.d.ts +0 -0
- {node v25.9 → node}/ts5.6/buffer.buffer.d.ts +0 -0
- {node v25.9 → node}/ts5.6/compatibility/float16array.d.ts +0 -0
- {node v25.9 → node}/ts5.6/globals.typedarray.d.ts +0 -0
- {node v25.9 → node}/ts5.7/compatibility/float16array.d.ts +0 -0
- {node v25.9 → node}/tty.d.ts +0 -0
- {node v25.9 → node}/wasi.d.ts +0 -0
- {node v25.9 → node}/web-globals/abortcontroller.d.ts +0 -0
- {node v25.9 → node}/web-globals/blob.d.ts +0 -0
- {node v25.9 → node}/web-globals/console.d.ts +0 -0
- {node v25.9 → node}/web-globals/crypto.d.ts +0 -0
- {node v25.9 → node}/web-globals/encoding.d.ts +0 -0
- {node v25.9 → node}/web-globals/events.d.ts +0 -0
- {node v25.9 → node}/web-globals/fetch.d.ts +0 -0
- {node v25.9 → node}/web-globals/importmeta.d.ts +0 -0
- {node v25.9 → node}/web-globals/messaging.d.ts +0 -0
- {node v25.9 → node}/web-globals/navigator.d.ts +0 -0
- {node v25.9 → node}/web-globals/performance.d.ts +0 -0
- {node v25.9 → node}/web-globals/storage.d.ts +0 -0
- {node v25.9 → node}/web-globals/streams.d.ts +0 -0
- {node v25.9 → node}/web-globals/timers.d.ts +0 -0
- {node v25.9 → node}/web-globals/url.d.ts +0 -0
- {node v25.9 → node}/zlib/iter.d.ts +0 -0
|
@@ -35,7 +35,7 @@ declare module "node:vm" {
|
|
|
35
35
|
/**
|
|
36
36
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
37
37
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
38
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
38
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
39
39
|
* @experimental
|
|
40
40
|
*/
|
|
41
41
|
importModuleDynamically?:
|
|
@@ -81,7 +81,7 @@ declare module "node:vm" {
|
|
|
81
81
|
/**
|
|
82
82
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
83
83
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
84
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
84
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
85
85
|
* @experimental
|
|
86
86
|
*/
|
|
87
87
|
importModuleDynamically?:
|
|
@@ -95,7 +95,7 @@ declare module "node:vm" {
|
|
|
95
95
|
/**
|
|
96
96
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
97
97
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
98
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
98
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
99
99
|
* @experimental
|
|
100
100
|
*/
|
|
101
101
|
importModuleDynamically?:
|
|
@@ -115,7 +115,7 @@ declare module "node:vm" {
|
|
|
115
115
|
/**
|
|
116
116
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
117
117
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
118
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
118
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
119
119
|
* @experimental
|
|
120
120
|
*/
|
|
121
121
|
importModuleDynamically?:
|
|
@@ -159,7 +159,7 @@ declare module "node:vm" {
|
|
|
159
159
|
/**
|
|
160
160
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
161
161
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
162
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
162
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
163
163
|
* @experimental
|
|
164
164
|
*/
|
|
165
165
|
importModuleDynamically?:
|
|
@@ -363,9 +363,9 @@ declare module "node:vm" {
|
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
365
365
|
* If the given `contextObject` is an object, the `vm.createContext()` method will
|
|
366
|
-
* [prepare that object](https://nodejs.org/docs/latest-
|
|
366
|
+
* [prepare that object](https://nodejs.org/docs/latest-v26.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
|
367
367
|
* and return a reference to it so that it can be used in calls to {@link runInContext} or
|
|
368
|
-
* [`script.runInContext()`](https://nodejs.org/docs/latest-
|
|
368
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v26.x/api/vm.html#scriptrunincontextcontextifiedobject-options).
|
|
369
369
|
* Inside such scripts, the global object will be wrapped by the `contextObject`, retaining all of its
|
|
370
370
|
* existing properties but also having the built-in objects and functions any standard
|
|
371
371
|
* [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
@@ -837,7 +837,7 @@ declare module "node:vm" {
|
|
|
837
837
|
/**
|
|
838
838
|
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
839
839
|
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
840
|
-
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
840
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
841
841
|
* @experimental
|
|
842
842
|
*/
|
|
843
843
|
importModuleDynamically?: DynamicModuleLoader<SourceTextModule> | undefined;
|
|
@@ -1112,7 +1112,7 @@ declare module "node:vm" {
|
|
|
1112
1112
|
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
|
1113
1113
|
* context to load the requested module.
|
|
1114
1114
|
*
|
|
1115
|
-
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-
|
|
1115
|
+
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v26.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
1116
1116
|
* @since v21.7.0, v20.12.0
|
|
1117
1117
|
*/
|
|
1118
1118
|
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
|
@@ -65,4 +65,19 @@ declare global {
|
|
|
65
65
|
readonly INVALID_NODE_TYPE_ERR: 24;
|
|
66
66
|
readonly DATA_CLONE_ERR: 25;
|
|
67
67
|
};
|
|
68
|
+
|
|
69
|
+
// Not conditional, as this is not yet exposed by the DOM lib generator.
|
|
70
|
+
interface QuotaExceededError extends DOMException {
|
|
71
|
+
readonly quota: number | null;
|
|
72
|
+
readonly requested: number | null;
|
|
73
|
+
}
|
|
74
|
+
var QuotaExceededError: {
|
|
75
|
+
prototype: QuotaExceededError;
|
|
76
|
+
new(message?: string, options?: QuotaExceededErrorOptions): QuotaExceededError;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
interface QuotaExceededErrorOptions {
|
|
80
|
+
quota?: number;
|
|
81
|
+
requested?: number;
|
|
82
|
+
}
|
|
68
83
|
}
|
|
@@ -22,9 +22,6 @@ declare module "node:worker_threads" {
|
|
|
22
22
|
const threadName: string | null;
|
|
23
23
|
const workerData: any;
|
|
24
24
|
interface WorkerPerformance extends Pick<Performance, "eventLoopUtilization"> {}
|
|
25
|
-
/** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
|
|
26
|
-
// TODO: remove in a future major @types/node version.
|
|
27
|
-
type TransferListItem = Transferable;
|
|
28
25
|
interface WorkerOptions {
|
|
29
26
|
/**
|
|
30
27
|
* List of arguments which would be stringified and appended to
|
|
@@ -340,13 +337,13 @@ declare module "node:worker_threads" {
|
|
|
340
337
|
interface Worker extends InternalEventEmitter<WorkerEventMap> {}
|
|
341
338
|
/**
|
|
342
339
|
* Mark an object as not transferable. If `object` occurs in the transfer list of
|
|
343
|
-
* a [`port.postMessage()`](https://nodejs.org/docs/latest-
|
|
340
|
+
* a [`port.postMessage()`](https://nodejs.org/docs/latest-v26.x/api/worker_threads.html#portpostmessagevalue-transferlist) call, an error is thrown. This is a no-op if
|
|
344
341
|
* `object` is a primitive value.
|
|
345
342
|
*
|
|
346
343
|
* In particular, this makes sense for objects that can be cloned, rather than
|
|
347
344
|
* transferred, and which are used by other objects on the sending side.
|
|
348
345
|
* For example, Node.js marks the `ArrayBuffer`s it uses for its
|
|
349
|
-
* [`Buffer` pool](https://nodejs.org/docs/latest-
|
|
346
|
+
* [`Buffer` pool](https://nodejs.org/docs/latest-v26.x/api/buffer.html#static-method-bufferallocunsafesize) with this.
|
|
350
347
|
* `ArrayBuffer.prototype.transfer()` is disallowed on such array buffer
|
|
351
348
|
* instances.
|
|
352
349
|
*
|
|
@@ -55,7 +55,7 @@ declare module "node:zlib" {
|
|
|
55
55
|
}
|
|
56
56
|
| undefined;
|
|
57
57
|
/**
|
|
58
|
-
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-
|
|
58
|
+
* Limits output size when using [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
|
|
59
59
|
* @default buffer.kMaxLength
|
|
60
60
|
*/
|
|
61
61
|
maxOutputLength?: number | undefined;
|
|
@@ -79,12 +79,12 @@ declare module "node:zlib" {
|
|
|
79
79
|
chunkSize?: number | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* Key-value object containing indexed
|
|
82
|
-
* [Zstd parameters](https://nodejs.org/docs/latest-
|
|
82
|
+
* [Zstd parameters](https://nodejs.org/docs/latest-v26.x/api/zlib.html#zstd-constants).
|
|
83
83
|
*/
|
|
84
84
|
params?: { [key: number]: number | boolean } | undefined;
|
|
85
85
|
/**
|
|
86
86
|
* Limits output size when using
|
|
87
|
-
* [convenience methods](https://nodejs.org/docs/latest-
|
|
87
|
+
* [convenience methods](https://nodejs.org/docs/latest-v26.x/api/zlib.html#convenience-methods).
|
|
88
88
|
* @default buffer.kMaxLength
|
|
89
89
|
*/
|
|
90
90
|
maxOutputLength?: number | undefined;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// Backwards-compatible iterator interfaces, augmented with iterator helper methods by lib.esnext.iterator in TypeScript 5.6.
|
|
2
|
-
// The IterableIterator interface does not contain these methods, which creates assignability issues in places where IteratorObjects
|
|
3
|
-
// are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
|
|
4
|
-
// Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
|
|
5
|
-
// if lib.esnext.iterator is loaded.
|
|
6
|
-
// TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
|
|
7
|
-
|
|
8
|
-
// Placeholders for TS <5.6
|
|
9
|
-
interface IteratorObject<T, TReturn, TNext> {}
|
|
10
|
-
interface AsyncIteratorObject<T, TReturn, TNext> {}
|
|
11
|
-
|
|
12
|
-
declare namespace NodeJS {
|
|
13
|
-
// Populate iterator methods for TS <5.6
|
|
14
|
-
interface Iterator<T, TReturn, TNext> extends globalThis.Iterator<T, TReturn, TNext> {}
|
|
15
|
-
interface AsyncIterator<T, TReturn, TNext> extends globalThis.AsyncIterator<T, TReturn, TNext> {}
|
|
16
|
-
|
|
17
|
-
// Polyfill for TS 5.6's instrinsic BuiltinIteratorReturn type, required for DOM-compatible iterators
|
|
18
|
-
type BuiltinIteratorReturn = ReturnType<any[][typeof Symbol.iterator]> extends
|
|
19
|
-
globalThis.Iterator<any, infer TReturn> ? TReturn
|
|
20
|
-
: any;
|
|
21
|
-
}
|
{node v25.9 → node}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/dgram.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/domain.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/https.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/path.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/quic.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/sea.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/timers.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{node v25.9 → node}/tty.d.ts
RENAMED
|
File without changes
|
{node v25.9 → node}/wasi.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|