@types/node 26.1.2 → 26.3.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/buffer.buffer.d.ts +5 -5
- node/child_process.d.ts +0 -1
- node/crypto.d.ts +8 -8
- node/dns/promises.d.ts +5 -5
- node/dns.d.ts +5 -5
- node/fs.d.ts +7 -0
- node/http.d.ts +46 -0
- node/http2.d.ts +14 -6
- node/os.d.ts +30 -30
- node/package.json +2 -2
- node/perf_hooks.d.ts +2 -1
- node/process.d.ts +94 -43
- node/quic.d.ts +1242 -95
- node/sqlite.d.ts +20 -3
- node/stream/iter.d.ts +3 -2
- node/test.d.ts +97 -0
- node/v8.d.ts +20 -23
node/sqlite.d.ts
CHANGED
|
@@ -127,8 +127,12 @@ declare module "node:sqlite" {
|
|
|
127
127
|
}
|
|
128
128
|
interface ApplyChangesetOptions {
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
130
|
+
* for each table affected by at least
|
|
131
|
+
* one change in the changeset, the `filter` callback is invoked with the
|
|
132
|
+
* table name as the first argument. If the return value is falsy, then no
|
|
133
|
+
* attempt is made to apply any changes to the table.
|
|
134
|
+
* Otherwise, if the return value is truthy or no `filter` callback is provided,
|
|
135
|
+
* all changes related to the table are attempted.
|
|
132
136
|
* @since v22.12.0
|
|
133
137
|
*/
|
|
134
138
|
filter?: ((tableName: string) => boolean) | undefined;
|
|
@@ -298,10 +302,23 @@ declare module "node:sqlite" {
|
|
|
298
302
|
* Loads a shared library into the database connection. This method is a wrapper
|
|
299
303
|
* around [`sqlite3_load_extension()`](https://www.sqlite.org/c3ref/load_extension.html). It is required to enable the
|
|
300
304
|
* `allowExtension` option when constructing the `DatabaseSync` instance.
|
|
305
|
+
*
|
|
306
|
+
* ```js
|
|
307
|
+
* import { DatabaseSync } from 'node:sqlite';
|
|
308
|
+
* const database = new DatabaseSync(':memory:', { allowExtension: true });
|
|
309
|
+
*
|
|
310
|
+
* // Load using the entry point derived from the filename.
|
|
311
|
+
* database.loadExtension('./decimal.dylib');
|
|
312
|
+
*
|
|
313
|
+
* // Override the entry point when the derived name does not match.
|
|
314
|
+
* database.loadExtension('./base64.dylib', 'sqlite3_base64_init');
|
|
301
315
|
* @since v22.13.0
|
|
302
316
|
* @param path The path to the shared library to load.
|
|
317
|
+
* @param entryPoint The name of the extension's entry-point function. When
|
|
318
|
+
* omitted, SQLite derives the entry point from the shared library's filename;
|
|
319
|
+
* pass this argument explicitly when the derived name does not match.
|
|
303
320
|
*/
|
|
304
|
-
loadExtension(path: string): void;
|
|
321
|
+
loadExtension(path: string, entryPoint?: string): void;
|
|
305
322
|
/**
|
|
306
323
|
* Enables or disables the `loadExtension` SQL function, and the `loadExtension()`
|
|
307
324
|
* 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,18 @@ declare module "node:test" {
|
|
|
668
677
|
* The nesting level of the test.
|
|
669
678
|
*/
|
|
670
679
|
nesting: number;
|
|
680
|
+
/**
|
|
681
|
+
* The `testId` of the enclosing test, or
|
|
682
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
683
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
684
|
+
*/
|
|
685
|
+
parentId: number | undefined;
|
|
686
|
+
/**
|
|
687
|
+
* The flattened lowercased tags declared on the test
|
|
688
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
689
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
690
|
+
*/
|
|
691
|
+
tags: string[];
|
|
671
692
|
/**
|
|
672
693
|
* A numeric identifier for this test instance, unique
|
|
673
694
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -696,6 +717,18 @@ declare module "node:test" {
|
|
|
696
717
|
* The nesting level of the test.
|
|
697
718
|
*/
|
|
698
719
|
nesting: number;
|
|
720
|
+
/**
|
|
721
|
+
* The `testId` of the enclosing test, or
|
|
722
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
723
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
724
|
+
*/
|
|
725
|
+
parentId: number | undefined;
|
|
726
|
+
/**
|
|
727
|
+
* The flattened lowercased tags declared on the test
|
|
728
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
729
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
730
|
+
*/
|
|
731
|
+
tags: string[];
|
|
699
732
|
/**
|
|
700
733
|
* A numeric identifier for this test instance, unique
|
|
701
734
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -717,6 +750,18 @@ declare module "node:test" {
|
|
|
717
750
|
* The nesting level of the test.
|
|
718
751
|
*/
|
|
719
752
|
nesting: number;
|
|
753
|
+
/**
|
|
754
|
+
* The `testId` of the enclosing test, or
|
|
755
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
756
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
757
|
+
*/
|
|
758
|
+
parentId: number | undefined;
|
|
759
|
+
/**
|
|
760
|
+
* The flattened lowercased tags declared on the test
|
|
761
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
762
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
763
|
+
*/
|
|
764
|
+
tags: string[];
|
|
720
765
|
/**
|
|
721
766
|
* A numeric identifier for this test instance, unique
|
|
722
767
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -762,6 +807,18 @@ declare module "node:test" {
|
|
|
762
807
|
* The nesting level of the test.
|
|
763
808
|
*/
|
|
764
809
|
nesting: number;
|
|
810
|
+
/**
|
|
811
|
+
* The `testId` of the enclosing test, or
|
|
812
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
813
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
814
|
+
*/
|
|
815
|
+
parentId: number | undefined;
|
|
816
|
+
/**
|
|
817
|
+
* The flattened lowercased tags declared on the test
|
|
818
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
819
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
820
|
+
*/
|
|
821
|
+
tags: string[];
|
|
765
822
|
/**
|
|
766
823
|
* A numeric identifier for this test instance, unique
|
|
767
824
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -823,6 +880,18 @@ declare module "node:test" {
|
|
|
823
880
|
* The nesting level of the test.
|
|
824
881
|
*/
|
|
825
882
|
nesting: number;
|
|
883
|
+
/**
|
|
884
|
+
* The `testId` of the enclosing test, or
|
|
885
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
886
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
887
|
+
*/
|
|
888
|
+
parentId: number | undefined;
|
|
889
|
+
/**
|
|
890
|
+
* The flattened lowercased tags declared on the test
|
|
891
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
892
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
893
|
+
*/
|
|
894
|
+
tags: string[];
|
|
826
895
|
/**
|
|
827
896
|
* A numeric identifier for this test instance, unique
|
|
828
897
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -861,6 +930,18 @@ declare module "node:test" {
|
|
|
861
930
|
* The nesting level of the test.
|
|
862
931
|
*/
|
|
863
932
|
nesting: number;
|
|
933
|
+
/**
|
|
934
|
+
* The `testId` of the enclosing test, or
|
|
935
|
+
* `undefined` for top-level tests. Lets custom reporters track lineage
|
|
936
|
+
* when concurrent siblings at the same nesting level interleave.
|
|
937
|
+
*/
|
|
938
|
+
parentId: number | undefined;
|
|
939
|
+
/**
|
|
940
|
+
* The flattened lowercased tags declared on the test
|
|
941
|
+
* and its ancestor suites, in declaration order. Empty for untagged tests.
|
|
942
|
+
* See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
943
|
+
*/
|
|
944
|
+
tags: string[];
|
|
864
945
|
/**
|
|
865
946
|
* A numeric identifier for this test instance, unique
|
|
866
947
|
* within the test file's process. Consistent across all events for the same
|
|
@@ -1082,6 +1163,13 @@ declare module "node:test" {
|
|
|
1082
1163
|
* @since v21.7.0, v20.12.0
|
|
1083
1164
|
*/
|
|
1084
1165
|
readonly attempt: number;
|
|
1166
|
+
/**
|
|
1167
|
+
* A frozen array of the test's flattened lowercased tags, in declaration
|
|
1168
|
+
* order, including any tags inherited from ancestor suites. Empty when the
|
|
1169
|
+
* test has no tags. See [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1170
|
+
* @since v26.2.0
|
|
1171
|
+
*/
|
|
1172
|
+
readonly tags: readonly string[];
|
|
1085
1173
|
/**
|
|
1086
1174
|
* The unique identifier of the worker running the current test file. This value is
|
|
1087
1175
|
* derived from the `NODE_TEST_WORKER_ID` environment variable. When running tests
|
|
@@ -1443,6 +1531,15 @@ declare module "node:test" {
|
|
|
1443
1531
|
* @default false
|
|
1444
1532
|
*/
|
|
1445
1533
|
skip?: boolean | string | undefined;
|
|
1534
|
+
/**
|
|
1535
|
+
* An array of string labels associated with the test.
|
|
1536
|
+
* Used together with `--experimental-test-tag-filter` to filter which
|
|
1537
|
+
* tests run. Tags inherit from suites to nested tests by union. See
|
|
1538
|
+
* [Test tags](https://nodejs.org/docs/latest-v26.x/api/test.html#test-tags).
|
|
1539
|
+
* @default []
|
|
1540
|
+
* @since v26.2.0
|
|
1541
|
+
*/
|
|
1542
|
+
tags?: readonly string[] | undefined;
|
|
1446
1543
|
/**
|
|
1447
1544
|
* A number of milliseconds the test will fail after. If unspecified, subtests inherit this
|
|
1448
1545
|
* 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';
|