@types/node 26.1.1 → 26.2.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/README.md +1 -1
- node/child_process.d.ts +0 -1
- node/crypto.d.ts +7 -7
- node/dns/promises.d.ts +5 -5
- node/dns.d.ts +5 -5
- node/fs.d.ts +7 -0
- node/http.d.ts +30 -0
- node/http2.d.ts +4 -4
- node/os.d.ts +30 -30
- node/package.json +2 -2
- node/perf_hooks.d.ts +2 -1
- node/process.d.ts +42 -43
- node/quic.d.ts +1049 -84
- node/sqlite.d.ts +14 -1
- node/stream/iter.d.ts +3 -2
- node/test.d.ts +61 -0
- node/v8.d.ts +20 -23
node/sqlite.d.ts
CHANGED
|
@@ -298,10 +298,23 @@ declare module "node:sqlite" {
|
|
|
298
298
|
* Loads a shared library into the database connection. This method is a wrapper
|
|
299
299
|
* around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
|
|
300
300
|
* `allowExtension` option when constructing the `DatabaseSync` instance.
|
|
301
|
+
*
|
|
302
|
+
* ```js
|
|
303
|
+
* import { DatabaseSync } from 'node:sqlite';
|
|
304
|
+
* const database = new DatabaseSync(':memory:', { allowExtension: true });
|
|
305
|
+
*
|
|
306
|
+
* // Load using the entry point derived from the filename.
|
|
307
|
+
* database.loadExtension('./decimal.dylib');
|
|
308
|
+
*
|
|
309
|
+
* // Override the entry point when the derived name does not match.
|
|
310
|
+
* database.loadExtension('./base64.dylib', 'sqlite3_base64_init');
|
|
301
311
|
* @since v22.13.0
|
|
302
312
|
* @param path The path to the shared library to load.
|
|
313
|
+
* @param entryPoint The name of the extension's entry-point function. When
|
|
314
|
+
* omitted, SQLite derives the entry point from the shared library's filename;
|
|
315
|
+
* pass this argument explicitly when the derived name does not match.
|
|
303
316
|
*/
|
|
304
|
-
loadExtension(path: string): void;
|
|
317
|
+
loadExtension(path: string, entryPoint?: string): void;
|
|
305
318
|
/**
|
|
306
319
|
* Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
|
|
307
320
|
* method. When `allowExtension` is `false` when constructing, you cannot enable
|
node/stream/iter.d.ts
CHANGED
|
@@ -311,8 +311,9 @@ declare module "node:stream/iter" {
|
|
|
311
311
|
* return `false` or `-1`, deferring to the async path. The per-write
|
|
312
312
|
* `options.signal` parameter from the Writer interface is also ignored.
|
|
313
313
|
*
|
|
314
|
-
* The result is cached per instance
|
|
315
|
-
*
|
|
314
|
+
* The result is cached per instance and backpressure policy -- calling
|
|
315
|
+
* `fromWritable()` twice with the same stream and `backpressure` option returns
|
|
316
|
+
* the same Writer.
|
|
316
317
|
*
|
|
317
318
|
* For duck-typed streams that do not expose `writableHighWaterMark`,
|
|
318
319
|
* `writableLength`, or similar properties, sensible defaults are used.
|
node/test.d.ts
CHANGED
|
@@ -264,6 +264,15 @@ declare module "node:test" {
|
|
|
264
264
|
* @since v22.1.0
|
|
265
265
|
*/
|
|
266
266
|
testSkipPatterns?: string | RegExp | ReadonlyArray<string | RegExp> | undefined;
|
|
267
|
+
/**
|
|
268
|
+
* A tag name, or an array of tag names,
|
|
269
|
+
* used to filter tests by their declared tags. Tests must contain every
|
|
270
|
+
* listed tag to run. Equivalent to passing `--experimental-test-tag-filter`
|
|
271
|
+
* on the command line. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
272
|
+
* @default undefined
|
|
273
|
+
* @since v26.2.0
|
|
274
|
+
*/
|
|
275
|
+
testTagFilters?: string | readonly string[] | undefined;
|
|
267
276
|
/**
|
|
268
277
|
* The number of milliseconds after which the test execution will fail.
|
|
269
278
|
* If unspecified, subtests inherit this value from their parent.
|
|
@@ -668,6 +677,12 @@ declare module "node:test" {
|
|
|
668
677
|
* The nesting level of the test.
|
|
669
678
|
*/
|
|
670
679
|
nesting: number;
|
|
680
|
+
/**
|
|
681
|
+
* The flattened lowercased tags declared on the test
|
|
682
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
683
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
684
|
+
*/
|
|
685
|
+
tags: string[];
|
|
671
686
|
/**
|
|
672
687
|
* A numeric identifier for this test instance, unique
|
|
673
688
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -696,6 +711,12 @@ declare module "node:test" {
|
|
|
696
711
|
* The nesting level of the test.
|
|
697
712
|
*/
|
|
698
713
|
nesting: number;
|
|
714
|
+
/**
|
|
715
|
+
* The flattened lowercased tags declared on the test
|
|
716
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
717
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
718
|
+
*/
|
|
719
|
+
tags: string[];
|
|
699
720
|
/**
|
|
700
721
|
* A numeric identifier for this test instance, unique
|
|
701
722
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -717,6 +738,12 @@ declare module "node:test" {
|
|
|
717
738
|
* The nesting level of the test.
|
|
718
739
|
*/
|
|
719
740
|
nesting: number;
|
|
741
|
+
/**
|
|
742
|
+
* The flattened lowercased tags declared on the test
|
|
743
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
744
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
745
|
+
*/
|
|
746
|
+
tags: string[];
|
|
720
747
|
/**
|
|
721
748
|
* A numeric identifier for this test instance, unique
|
|
722
749
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -762,6 +789,12 @@ declare module "node:test" {
|
|
|
762
789
|
* The nesting level of the test.
|
|
763
790
|
*/
|
|
764
791
|
nesting: number;
|
|
792
|
+
/**
|
|
793
|
+
* The flattened lowercased tags declared on the test
|
|
794
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
795
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
796
|
+
*/
|
|
797
|
+
tags: string[];
|
|
765
798
|
/**
|
|
766
799
|
* A numeric identifier for this test instance, unique
|
|
767
800
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -823,6 +856,12 @@ declare module "node:test" {
|
|
|
823
856
|
* The nesting level of the test.
|
|
824
857
|
*/
|
|
825
858
|
nesting: number;
|
|
859
|
+
/**
|
|
860
|
+
* The flattened lowercased tags declared on the test
|
|
861
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
862
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
863
|
+
*/
|
|
864
|
+
tags: string[];
|
|
826
865
|
/**
|
|
827
866
|
* A numeric identifier for this test instance, unique
|
|
828
867
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -861,6 +900,12 @@ declare module "node:test" {
|
|
|
861
900
|
* The nesting level of the test.
|
|
862
901
|
*/
|
|
863
902
|
nesting: number;
|
|
903
|
+
/**
|
|
904
|
+
* The flattened lowercased tags declared on the test
|
|
905
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
906
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
907
|
+
*/
|
|
908
|
+
tags: string[];
|
|
864
909
|
/**
|
|
865
910
|
* A numeric identifier for this test instance, unique
|
|
866
911
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -1082,6 +1127,13 @@ declare module "node:test" {
|
|
|
1082
1127
|
* @since v21.7.0, v20.12.0
|
|
1083
1128
|
*/
|
|
1084
1129
|
readonly attempt: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* A frozen array of the test's flattened lowercased tags, in declaration
|
|
1132
|
+
* order, including any tags inherited from ancestor suites. Empty when the
|
|
1133
|
+
* test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1134
|
+
* @since v26.2.0
|
|
1135
|
+
*/
|
|
1136
|
+
readonly tags: readonly string[];
|
|
1085
1137
|
/**
|
|
1086
1138
|
* The unique identifier of the worker running the current test file. This value is
|
|
1087
1139
|
* derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests
|
|
@@ -1443,6 +1495,15 @@ declare module "node:test" {
|
|
|
1443
1495
|
* @default false
|
|
1444
1496
|
*/
|
|
1445
1497
|
skip?: boolean | string | undefined;
|
|
1498
|
+
/**
|
|
1499
|
+
* An array of string labels associated with the test.
|
|
1500
|
+
* Used together with `--experimental-test-tag-filter` to filter which
|
|
1501
|
+
* tests run. Tags inherit from suites to nested tests by union. See
|
|
1502
|
+
* [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1503
|
+
* @default []
|
|
1504
|
+
* @since v26.2.0
|
|
1505
|
+
*/
|
|
1506
|
+
tags?: readonly string[] | undefined;
|
|
1446
1507
|
/**
|
|
1447
1508
|
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
|
1448
1509
|
* value from their parent.
|
node/v8.d.ts
CHANGED
|
@@ -89,23 +89,22 @@ declare module "node:v8" {
|
|
|
89
89
|
* `total_allocated_bytes` The value of total allocated bytes since the Isolate
|
|
90
90
|
* creation.
|
|
91
91
|
*
|
|
92
|
-
* ```
|
|
92
|
+
* ```json
|
|
93
93
|
* {
|
|
94
|
-
* total_heap_size: 7326976,
|
|
95
|
-
* total_heap_size_executable: 4194304,
|
|
96
|
-
* total_physical_size: 7326976,
|
|
97
|
-
* total_available_size: 1152656,
|
|
98
|
-
* used_heap_size: 3476208,
|
|
99
|
-
* heap_size_limit: 1535115264,
|
|
100
|
-
* malloced_memory: 16384,
|
|
101
|
-
* peak_malloced_memory: 1127496,
|
|
102
|
-
* does_zap_garbage: 0,
|
|
103
|
-
* number_of_native_contexts: 1,
|
|
104
|
-
* number_of_detached_contexts: 0,
|
|
105
|
-
* total_global_handles_size: 8192,
|
|
106
|
-
* used_global_handles_size: 3296,
|
|
107
|
-
* external_memory: 318824
|
|
108
|
-
* total_allocated_bytes: 45224088
|
|
94
|
+
* "total_heap_size": 7326976,
|
|
95
|
+
* "total_heap_size_executable": 4194304,
|
|
96
|
+
* "total_physical_size": 7326976,
|
|
97
|
+
* "total_available_size": 1152656,
|
|
98
|
+
* "used_heap_size": 3476208,
|
|
99
|
+
* "heap_size_limit": 1535115264,
|
|
100
|
+
* "malloced_memory": 16384,
|
|
101
|
+
* "peak_malloced_memory": 1127496,
|
|
102
|
+
* "does_zap_garbage": 0,
|
|
103
|
+
* "number_of_native_contexts": 1,
|
|
104
|
+
* "number_of_detached_contexts": 0,
|
|
105
|
+
* "total_global_handles_size": 8192,
|
|
106
|
+
* "used_global_handles_size": 3296,
|
|
107
|
+
* "external_memory": 318824
|
|
109
108
|
* }
|
|
110
109
|
* ```
|
|
111
110
|
* @since v1.0.0
|
|
@@ -386,12 +385,12 @@ declare module "node:v8" {
|
|
|
386
385
|
* V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
|
|
387
386
|
* following properties:
|
|
388
387
|
*
|
|
389
|
-
* ```
|
|
388
|
+
* ```json
|
|
390
389
|
* {
|
|
391
|
-
* code_and_metadata_size: 212208,
|
|
392
|
-
* bytecode_and_metadata_size: 161368,
|
|
393
|
-
* external_script_source_size: 1410794,
|
|
394
|
-
* cpu_profiler_metadata_size: 0
|
|
390
|
+
* "code_and_metadata_size": 212208,
|
|
391
|
+
* "bytecode_and_metadata_size": 161368,
|
|
392
|
+
* "external_script_source_size": 1410794,
|
|
393
|
+
* "cpu_profiler_metadata_size": 0
|
|
395
394
|
* }
|
|
396
395
|
* ```
|
|
397
396
|
* @since v12.8.0
|
|
@@ -963,8 +962,6 @@ declare module "node:v8" {
|
|
|
963
962
|
* For example, if the `entry.js` contains the following script:
|
|
964
963
|
*
|
|
965
964
|
* ```js
|
|
966
|
-
* 'use strict';
|
|
967
|
-
*
|
|
968
965
|
* import fs from 'node:fs';
|
|
969
966
|
* import zlib from 'node:zlib';
|
|
970
967
|
* import path from 'node:path';
|