@types/node 24.10.14 → 24.11.0
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 v24.10 → node v24.11}/README.md +1 -1
- {node v24.10 → node v24.11}/inspector.generated.d.ts +14 -1
- {node v24.10 → node v24.11}/package.json +2 -2
- {node v24.10 → node v24.11}/process.d.ts +1 -6
- {node v24.10 → node v24.11}/sqlite.d.ts +8 -10
- {node v24.10 → node v24.11}/url.d.ts +2 -2
- {node v24.10 → node v24.11}/vm.d.ts +30 -15
- {node v24.10 → node v24.11}/worker_threads.d.ts +14 -14
- {node v24.10 → node v24.11}/LICENSE +0 -0
- {node v24.10 → node v24.11}/assert/strict.d.ts +0 -0
- {node v24.10 → node v24.11}/assert.d.ts +0 -0
- {node v24.10 → node v24.11}/async_hooks.d.ts +0 -0
- {node v24.10 → node v24.11}/buffer.buffer.d.ts +0 -0
- {node v24.10 → node v24.11}/buffer.d.ts +0 -0
- {node v24.10 → node v24.11}/child_process.d.ts +0 -0
- {node v24.10 → node v24.11}/cluster.d.ts +0 -0
- {node v24.10 → node v24.11}/compatibility/iterators.d.ts +0 -0
- {node v24.10 → node v24.11}/console.d.ts +0 -0
- {node v24.10 → node v24.11}/constants.d.ts +0 -0
- {node v24.10 → node v24.11}/crypto.d.ts +0 -0
- {node v24.10 → node v24.11}/dgram.d.ts +0 -0
- {node v24.10 → node v24.11}/diagnostics_channel.d.ts +0 -0
- {node v24.10 → node v24.11}/dns/promises.d.ts +0 -0
- {node v24.10 → node v24.11}/dns.d.ts +0 -0
- {node v24.10 → node v24.11}/domain.d.ts +0 -0
- {node v24.10 → node v24.11}/events.d.ts +0 -0
- {node v24.10 → node v24.11}/fs/promises.d.ts +0 -0
- {node v24.10 → node v24.11}/fs.d.ts +0 -0
- {node v24.10 → node v24.11}/globals.d.ts +0 -0
- {node v24.10 → node v24.11}/globals.typedarray.d.ts +0 -0
- {node v24.10 → node v24.11}/http.d.ts +0 -0
- {node v24.10 → node v24.11}/http2.d.ts +0 -0
- {node v24.10 → node v24.11}/https.d.ts +0 -0
- {node v24.10 → node v24.11}/index.d.ts +0 -0
- {node v24.10 → node v24.11}/inspector.d.ts +0 -0
- {node v24.10 → node v24.11}/module.d.ts +0 -0
- {node v24.10 → node v24.11}/net.d.ts +0 -0
- {node v24.10 → node v24.11}/os.d.ts +0 -0
- {node v24.10 → node v24.11}/path.d.ts +0 -0
- {node v24.10 → node v24.11}/perf_hooks.d.ts +0 -0
- {node v24.10 → node v24.11}/punycode.d.ts +0 -0
- {node v24.10 → node v24.11}/querystring.d.ts +0 -0
- {node v24.10 → node v24.11}/readline/promises.d.ts +0 -0
- {node v24.10 → node v24.11}/readline.d.ts +0 -0
- {node v24.10 → node v24.11}/repl.d.ts +0 -0
- {node v24.10 → node v24.11}/sea.d.ts +0 -0
- {node v24.10 → node v24.11}/stream/consumers.d.ts +0 -0
- {node v24.10 → node v24.11}/stream/promises.d.ts +0 -0
- {node v24.10 → node v24.11}/stream/web.d.ts +0 -0
- {node v24.10 → node v24.11}/stream.d.ts +0 -0
- {node v24.10 → node v24.11}/string_decoder.d.ts +0 -0
- {node v24.10 → node v24.11}/test.d.ts +0 -0
- {node v24.10 → node v24.11}/timers/promises.d.ts +0 -0
- {node v24.10 → node v24.11}/timers.d.ts +0 -0
- {node v24.10 → node v24.11}/tls.d.ts +0 -0
- {node v24.10 → node v24.11}/trace_events.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.6/buffer.buffer.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.6/compatibility/float16array.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.6/globals.typedarray.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.6/index.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.7/compatibility/float16array.d.ts +0 -0
- {node v24.10 → node v24.11}/ts5.7/index.d.ts +0 -0
- {node v24.10 → node v24.11}/tty.d.ts +0 -0
- {node v24.10 → node v24.11}/util.d.ts +0 -0
- {node v24.10 → node v24.11}/v8.d.ts +0 -0
- {node v24.10 → node v24.11}/wasi.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/abortcontroller.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/crypto.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/domexception.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/events.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/fetch.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/navigator.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/storage.d.ts +0 -0
- {node v24.10 → node v24.11}/web-globals/streams.d.ts +0 -0
- {node v24.10 → node v24.11}/zlib.d.ts +0 -0
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Sat, 28 Feb 2026 03:35:33 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -1791,6 +1791,18 @@ declare module "inspector" {
|
|
|
1791
1791
|
*/
|
|
1792
1792
|
headers: Headers;
|
|
1793
1793
|
}
|
|
1794
|
+
interface EnableParameterType {
|
|
1795
|
+
/**
|
|
1796
|
+
* Buffer size in bytes to use when preserving network payloads (XHRs, etc).
|
|
1797
|
+
* @experimental
|
|
1798
|
+
*/
|
|
1799
|
+
maxTotalBufferSize?: number | undefined;
|
|
1800
|
+
/**
|
|
1801
|
+
* Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
|
|
1802
|
+
* @experimental
|
|
1803
|
+
*/
|
|
1804
|
+
maxResourceBufferSize?: number | undefined;
|
|
1805
|
+
}
|
|
1794
1806
|
interface GetRequestPostDataParameterType {
|
|
1795
1807
|
/**
|
|
1796
1808
|
* Identifier of the network request to get content for.
|
|
@@ -2379,6 +2391,7 @@ declare module "inspector" {
|
|
|
2379
2391
|
/**
|
|
2380
2392
|
* Enables network tracking, network events will now be delivered to the client.
|
|
2381
2393
|
*/
|
|
2394
|
+
post(method: "Network.enable", params?: Network.EnableParameterType, callback?: (err: Error | null) => void): void;
|
|
2382
2395
|
post(method: "Network.enable", callback?: (err: Error | null) => void): void;
|
|
2383
2396
|
/**
|
|
2384
2397
|
* Returns post data sent with the request. Returns an error when no data was sent with the request.
|
|
@@ -3477,7 +3490,7 @@ declare module "inspector/promises" {
|
|
|
3477
3490
|
/**
|
|
3478
3491
|
* Enables network tracking, network events will now be delivered to the client.
|
|
3479
3492
|
*/
|
|
3480
|
-
post(method: "Network.enable"): Promise<void>;
|
|
3493
|
+
post(method: "Network.enable", params?: Network.EnableParameterType): Promise<void>;
|
|
3481
3494
|
/**
|
|
3482
3495
|
* Returns post data sent with the request. Returns an error when no data was sent with the request.
|
|
3483
3496
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.11.0",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~7.16.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "bb3c46c27837daf0bc24f50415f9f04839739b8e5b827ef4b3043dcbf054decf",
|
|
154
154
|
"typeScriptVersion": "5.2"
|
|
155
155
|
}
|
|
@@ -344,12 +344,7 @@ declare module "process" {
|
|
|
344
344
|
isTTY?: true | undefined;
|
|
345
345
|
}
|
|
346
346
|
// Alias for compatibility
|
|
347
|
-
interface ProcessEnv extends Dict<string> {
|
|
348
|
-
/**
|
|
349
|
-
* Can be used to change the default timezone at runtime
|
|
350
|
-
*/
|
|
351
|
-
TZ?: string | undefined;
|
|
352
|
-
}
|
|
347
|
+
interface ProcessEnv extends Dict<string> {}
|
|
353
348
|
interface HRTime {
|
|
354
349
|
/**
|
|
355
350
|
* This is the legacy version of {@link process.hrtime.bigint()}
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
* import sqlite from 'node:sqlite';
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
|
-
* This module is only available under the `node:` scheme.
|
|
10
|
-
* work:
|
|
11
|
-
*
|
|
12
|
-
* ```js
|
|
13
|
-
* import sqlite from 'sqlite';
|
|
14
|
-
* ```
|
|
9
|
+
* This module is only available under the `node:` scheme.
|
|
15
10
|
*
|
|
16
11
|
* The following example shows the basic usage of the `node:sqlite` module to open
|
|
17
12
|
* an in-memory database, write data to the database, and then read the data back.
|
|
@@ -413,7 +408,7 @@ declare module "node:sqlite" {
|
|
|
413
408
|
*/
|
|
414
409
|
prepare(sql: string): StatementSync;
|
|
415
410
|
/**
|
|
416
|
-
* Creates a new `SQLTagStore
|
|
411
|
+
* Creates a new {@link SQLTagStore `SQLTagStore`}, which is an LRU (Least Recently Used) cache for
|
|
417
412
|
* storing prepared statements. This allows for the efficient reuse of prepared
|
|
418
413
|
* statements by tagging them with a unique identifier.
|
|
419
414
|
*
|
|
@@ -427,7 +422,7 @@ declare module "node:sqlite" {
|
|
|
427
422
|
* import { DatabaseSync } from 'node:sqlite';
|
|
428
423
|
*
|
|
429
424
|
* const db = new DatabaseSync(':memory:');
|
|
430
|
-
* const sql = db.
|
|
425
|
+
* const sql = db.createTagStore();
|
|
431
426
|
*
|
|
432
427
|
* db.exec('CREATE TABLE users (id INT, name TEXT)');
|
|
433
428
|
*
|
|
@@ -450,6 +445,7 @@ declare module "node:sqlite" {
|
|
|
450
445
|
* // ]
|
|
451
446
|
* ```
|
|
452
447
|
* @since v24.9.0
|
|
448
|
+
* @param maxSize The maximum number of prepared statements to cache. **Default**: `1000`.
|
|
453
449
|
* @returns A new SQL tag store for caching prepared statements.
|
|
454
450
|
*/
|
|
455
451
|
createTagStore(maxSize?: number): SQLTagStore;
|
|
@@ -468,6 +464,8 @@ declare module "node:sqlite" {
|
|
|
468
464
|
* [`sqlite3changeset_apply()`](https://www.sqlite.org/session/sqlite3changeset_apply.html).
|
|
469
465
|
*
|
|
470
466
|
* ```js
|
|
467
|
+
* import { DatabaseSync } from 'node:sqlite';
|
|
468
|
+
*
|
|
471
469
|
* const sourceDb = new DatabaseSync(':memory:');
|
|
472
470
|
* const targetDb = new DatabaseSync(':memory:');
|
|
473
471
|
*
|
|
@@ -530,14 +528,14 @@ declare module "node:sqlite" {
|
|
|
530
528
|
* This class represents a single LRU (Least Recently Used) cache for storing
|
|
531
529
|
* prepared statements.
|
|
532
530
|
*
|
|
533
|
-
* Instances of this class are created via the database.
|
|
531
|
+
* Instances of this class are created via the database.createTagStore() method,
|
|
534
532
|
* not by using a constructor. The store caches prepared statements based on the
|
|
535
533
|
* provided SQL query string. When the same query is seen again, the store
|
|
536
534
|
* retrieves the cached statement and safely applies the new values through
|
|
537
535
|
* parameter binding, thereby preventing attacks like SQL injection.
|
|
538
536
|
*
|
|
539
537
|
* The cache has a maxSize that defaults to 1000 statements, but a custom size can
|
|
540
|
-
* be provided (e.g., database.
|
|
538
|
+
* be provided (e.g., database.createTagStore(100)). All APIs exposed by this
|
|
541
539
|
* class execute synchronously.
|
|
542
540
|
* @since v24.9.0
|
|
543
541
|
*/
|
|
@@ -80,7 +80,7 @@ declare module "url" {
|
|
|
80
80
|
* function getURL(req) {
|
|
81
81
|
* const proto = req.headers['x-forwarded-proto'] || 'https';
|
|
82
82
|
* const host = req.headers['x-forwarded-host'] || req.headers.host || 'example.com';
|
|
83
|
-
* return new URL(req.url || '/'
|
|
83
|
+
* return new URL(`${proto}://${host}${req.url || '/'}`);
|
|
84
84
|
* }
|
|
85
85
|
* ```
|
|
86
86
|
*
|
|
@@ -90,7 +90,7 @@ declare module "url" {
|
|
|
90
90
|
*
|
|
91
91
|
* ```js
|
|
92
92
|
* function getURL(req) {
|
|
93
|
-
* return new URL(req.url || '/'
|
|
93
|
+
* return new URL(`https://example.com${req.url || '/'}`);
|
|
94
94
|
* }
|
|
95
95
|
* ```
|
|
96
96
|
* @since v0.1.25
|
|
@@ -748,8 +748,8 @@ declare module "vm" {
|
|
|
748
748
|
* // The "secret" variable refers to the global variable we added to
|
|
749
749
|
* // "contextifiedObject" when creating the context.
|
|
750
750
|
* export default secret;
|
|
751
|
-
* `, { context:
|
|
752
|
-
* moduleMap.set(specifier,
|
|
751
|
+
* `, { context: module.context });
|
|
752
|
+
* moduleMap.set(specifier, requestedModule);
|
|
753
753
|
* // Resolve the dependencies of the new module as well.
|
|
754
754
|
* resolveAndLinkDependencies(requestedModule);
|
|
755
755
|
* }
|
|
@@ -819,19 +819,34 @@ declare module "vm" {
|
|
|
819
819
|
*/
|
|
820
820
|
status: ModuleStatus;
|
|
821
821
|
/**
|
|
822
|
-
* Evaluate the module.
|
|
823
|
-
*
|
|
824
|
-
*
|
|
825
|
-
*
|
|
826
|
-
*
|
|
827
|
-
*
|
|
828
|
-
*
|
|
829
|
-
*
|
|
830
|
-
*
|
|
831
|
-
*
|
|
832
|
-
*
|
|
833
|
-
*
|
|
834
|
-
*
|
|
822
|
+
* Evaluate the module and its depenendencies. Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation)
|
|
823
|
+
* field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)s in the ECMAScript specification.
|
|
824
|
+
*
|
|
825
|
+
* If the module is a `vm.SourceTextModule`, `evaluate()` must be called after the module has been instantiated;
|
|
826
|
+
* otherwise `evaluate()` will return a rejected promise.
|
|
827
|
+
*
|
|
828
|
+
* For a `vm.SourceTextModule`, the promise returned by `evaluate()` may be fulfilled either synchronously or asynchronously:
|
|
829
|
+
* 1. If the `vm.SourceTextModule` has no top-level `await` in itself or any of its dependencies, the promise will be
|
|
830
|
+
* fulfilled synchronously after the module and all its dependencies have been evaluated.
|
|
831
|
+
* 1. If the evaluation succeeds, the promise will be _synchronously_ resolved to `undefined`.
|
|
832
|
+
* 2. If the evaluation results in an exception, the promise will be _synchronously_ rejected with the exception that causes the evaluation to fail, which is the same as `module.error`.
|
|
833
|
+
* 2. If the `vm.SourceTextModule` has top-level `await` in itself or any of its dependencies, the promise will be fulfilled asynchronously after the module and all its dependencies have been evaluated.
|
|
834
|
+
* 1. If the evaluation succeeds, the promise will be _asynchronously_ resolved to `undefined`.
|
|
835
|
+
* 2. If the evaluation results in an exception, the promise will be _asynchronously_ rejected with the exception that causes the evaluation to fail.
|
|
836
|
+
*
|
|
837
|
+
* If the module is a `vm.SyntheticModule`, `evaluate()` always returns a promise that fulfills synchronously,
|
|
838
|
+
* see the specification of [Evaluate() of a Synthetic Module Record](https://tc39.es/ecma262/#sec-smr-Evaluate):
|
|
839
|
+
* 1. If the `evaluateCallback` passed to its constructor throws an exception synchronously, `evaluate()` returns a promise that will be synchronously rejected with that exception.
|
|
840
|
+
* 2. If the `evaluateCallback` does not throw an exception, `evaluate()` returns a promise that will be synchronously resolved to `undefined`.
|
|
841
|
+
*
|
|
842
|
+
* The `evaluateCallback` of a `vm.SyntheticModule` is executed synchronously within the `evaluate()` call, and its return value is discarded. This means if `evaluateCallback` is an asynchronous function, the promise
|
|
843
|
+
* returned by `evaluate()` will not reflect its asynchronous behavior, and any rejections from an asynchronous `evaluateCallback` will be lost.
|
|
844
|
+
*
|
|
845
|
+
* evaluate() could also be called again after the module has already been evaluated, in which case:
|
|
846
|
+
* 1. If the initial evaluation ended in success (`module.status` is `'evaluated'`), it will do nothing and return a promise that resolves to `undefined`.
|
|
847
|
+
* 2. If the initial evaluation resulted in an exception (`module.status` is `'errored'`), it will re-reject the exception that the initial evaluation resulted in.
|
|
848
|
+
*
|
|
849
|
+
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
|
|
835
850
|
* @return Fulfills with `undefined` upon success.
|
|
836
851
|
*/
|
|
837
852
|
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* JavaScript in parallel. To access it:
|
|
4
4
|
*
|
|
5
5
|
* ```js
|
|
6
|
-
* import
|
|
6
|
+
* import worker_threads from 'node:worker_threads';
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
9
|
* Workers (threads) are useful for performing CPU-intensive JavaScript operations.
|
|
@@ -446,8 +446,8 @@ declare module "worker_threads" {
|
|
|
446
446
|
*/
|
|
447
447
|
terminate(): Promise<number>;
|
|
448
448
|
/**
|
|
449
|
-
* This method returns a `Promise` that will resolve to an object identical to
|
|
450
|
-
* or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running.
|
|
449
|
+
* This method returns a `Promise` that will resolve to an object identical to {@link process.threadCpuUsage()},
|
|
450
|
+
* or reject with an [`ERR_WORKER_NOT_RUNNING`](https://nodejs.org/docs/latest-v24.x/api/errors.html#err_worker_not_running) error if the worker is no longer running.
|
|
451
451
|
* This methods allows the statistics to be observed from outside the actual thread.
|
|
452
452
|
* @since v24.6.0
|
|
453
453
|
*/
|
|
@@ -556,49 +556,49 @@ declare module "worker_threads" {
|
|
|
556
556
|
* @since v24.2.0
|
|
557
557
|
*/
|
|
558
558
|
[Symbol.asyncDispose](): Promise<void>;
|
|
559
|
-
addListener(event: "error", listener: (err:
|
|
559
|
+
addListener(event: "error", listener: (err: any) => void): this;
|
|
560
560
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
561
561
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
562
562
|
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
563
563
|
addListener(event: "online", listener: () => void): this;
|
|
564
564
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
565
|
-
emit(event: "error", err:
|
|
565
|
+
emit(event: "error", err: any): boolean;
|
|
566
566
|
emit(event: "exit", exitCode: number): boolean;
|
|
567
567
|
emit(event: "message", value: any): boolean;
|
|
568
568
|
emit(event: "messageerror", error: Error): boolean;
|
|
569
569
|
emit(event: "online"): boolean;
|
|
570
570
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
571
|
-
on(event: "error", listener: (err:
|
|
571
|
+
on(event: "error", listener: (err: any) => void): this;
|
|
572
572
|
on(event: "exit", listener: (exitCode: number) => void): this;
|
|
573
573
|
on(event: "message", listener: (value: any) => void): this;
|
|
574
574
|
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
575
575
|
on(event: "online", listener: () => void): this;
|
|
576
576
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
577
|
-
once(event: "error", listener: (err:
|
|
577
|
+
once(event: "error", listener: (err: any) => void): this;
|
|
578
578
|
once(event: "exit", listener: (exitCode: number) => void): this;
|
|
579
579
|
once(event: "message", listener: (value: any) => void): this;
|
|
580
580
|
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
581
581
|
once(event: "online", listener: () => void): this;
|
|
582
582
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
583
|
-
prependListener(event: "error", listener: (err:
|
|
583
|
+
prependListener(event: "error", listener: (err: any) => void): this;
|
|
584
584
|
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
585
585
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
586
586
|
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
587
587
|
prependListener(event: "online", listener: () => void): this;
|
|
588
588
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
589
|
-
prependOnceListener(event: "error", listener: (err:
|
|
589
|
+
prependOnceListener(event: "error", listener: (err: any) => void): this;
|
|
590
590
|
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
591
591
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
592
592
|
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
593
593
|
prependOnceListener(event: "online", listener: () => void): this;
|
|
594
594
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
595
|
-
removeListener(event: "error", listener: (err:
|
|
595
|
+
removeListener(event: "error", listener: (err: any) => void): this;
|
|
596
596
|
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
597
597
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
598
598
|
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
599
599
|
removeListener(event: "online", listener: () => void): this;
|
|
600
600
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
601
|
-
off(event: "error", listener: (err:
|
|
601
|
+
off(event: "error", listener: (err: any) => void): this;
|
|
602
602
|
off(event: "exit", listener: (exitCode: number) => void): this;
|
|
603
603
|
off(event: "message", listener: (value: any) => void): this;
|
|
604
604
|
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
@@ -691,7 +691,7 @@ declare module "worker_threads" {
|
|
|
691
691
|
var locks: LockManager;
|
|
692
692
|
/**
|
|
693
693
|
* Mark an object as not transferable. If `object` occurs in the transfer list of
|
|
694
|
-
* a
|
|
694
|
+
* a {@link MessagePort.postMessage port.postMessage()} call, it is ignored.
|
|
695
695
|
*
|
|
696
696
|
* In particular, this makes sense for objects that can be cloned, rather than
|
|
697
697
|
* transferred, and which are used by other objects on the sending side.
|
|
@@ -813,13 +813,13 @@ declare module "worker_threads" {
|
|
|
813
813
|
*
|
|
814
814
|
* if (isMainThread) {
|
|
815
815
|
* setEnvironmentData('Hello', 'World!');
|
|
816
|
-
* const worker = new Worker(
|
|
816
|
+
* const worker = new Worker(new URL(import.meta.url));
|
|
817
817
|
* } else {
|
|
818
818
|
* console.log(getEnvironmentData('Hello')); // Prints 'World!'.
|
|
819
819
|
* }
|
|
820
820
|
* ```
|
|
821
821
|
* @since v15.12.0, v14.18.0
|
|
822
|
-
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
|
|
822
|
+
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map Map} key.
|
|
823
823
|
*/
|
|
824
824
|
function getEnvironmentData(key: Serializable): Serializable;
|
|
825
825
|
/**
|
|
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
|
|
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
|
|
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
|
|
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
|