cdk-common 2.0.1351 → 2.0.1352
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.
- package/.jsii +38 -2
- package/API.md +36 -0
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +7 -1
- package/lib/managed-policies.js +7 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert/strict.d.ts +5 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/concat-stream/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/concat-stream/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/concat-stream/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/concat-stream/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/concat-stream/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/concat-stream/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/concat-stream/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/concat-stream/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +8 -71
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/assert/strict.d.ts +5 -11
- package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +9 -169
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +8 -8
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +44 -168
- package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +16 -64
- package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +240 -332
- package/node_modules/@types/form-data/node_modules/@types/node/console.d.ts +49 -351
- package/node_modules/@types/form-data/node_modules/@types/node/constants.d.ts +3 -4
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +279 -1631
- package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +15 -51
- package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +131 -132
- package/node_modules/@types/form-data/node_modules/@types/node/domain.d.ts +13 -17
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +869 -791
- package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +7 -8
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +417 -455
- package/node_modules/@types/form-data/node_modules/@types/node/globals.d.ts +6 -26
- package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +60 -0
- package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +263 -254
- package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +528 -804
- package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +59 -239
- package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.d.ts +6 -59
- package/node_modules/@types/form-data/node_modules/@types/node/inspector.generated.d.ts +3 -10
- package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +47 -122
- package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +63 -184
- package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +6 -6
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/form-data/node_modules/@types/node/path.d.ts +120 -133
- package/node_modules/@types/form-data/node_modules/@types/node/perf_hooks.d.ts +282 -643
- package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +156 -128
- package/node_modules/@types/form-data/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/form-data/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/quic.d.ts +910 -0
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +67 -120
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +75 -98
- package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/form-data/node_modules/@types/node/stream/promises.d.ts +136 -15
- package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +176 -453
- package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +555 -478
- package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +80 -180
- package/node_modules/@types/form-data/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +4 -130
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +102 -177
- package/node_modules/@types/form-data/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +1 -7
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/ts5.7/index.d.ts +15 -1
- package/node_modules/@types/form-data/node_modules/@types/node/tty.d.ts +58 -16
- package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +54 -592
- package/node_modules/@types/form-data/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +120 -792
- package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +32 -5
- package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +13 -13
- package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +4 -4
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/abortcontroller.d.ts +27 -2
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/crypto.d.ts +7 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/events.d.ts +9 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/fetch.d.ts +4 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/streams.d.ts +93 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/form-data/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +176 -358
- package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +8 -71
- package/package.json +4 -4
|
@@ -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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 16 Dec 2025 21:35:18 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
* To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
|
|
41
41
|
* environment variables. This will also deactivate the colors in the REPL. For
|
|
42
42
|
* more on color support in terminal environments, read the tty
|
|
43
|
-
* [`getColorDepth()`](https://nodejs.org/docs/latest-
|
|
43
|
+
* [`getColorDepth()`](https://nodejs.org/docs/latest-v25.x/api/tty.html#writestreamgetcolordepthenv) documentation.
|
|
44
44
|
* @since v15.0.0
|
|
45
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
45
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert/strict.js)
|
|
46
46
|
*/
|
|
47
|
-
declare module "assert/strict" {
|
|
47
|
+
declare module "node:assert/strict" {
|
|
48
48
|
import {
|
|
49
49
|
Assert,
|
|
50
50
|
AssertionError,
|
|
@@ -52,9 +52,6 @@ declare module "assert/strict" {
|
|
|
52
52
|
AssertOptions,
|
|
53
53
|
AssertPredicate,
|
|
54
54
|
AssertStrict,
|
|
55
|
-
CallTracker,
|
|
56
|
-
CallTrackerCall,
|
|
57
|
-
CallTrackerReportInformation,
|
|
58
55
|
deepStrictEqual,
|
|
59
56
|
doesNotMatch,
|
|
60
57
|
doesNotReject,
|
|
@@ -79,9 +76,6 @@ declare module "assert/strict" {
|
|
|
79
76
|
AssertOptions,
|
|
80
77
|
AssertPredicate,
|
|
81
78
|
AssertStrict,
|
|
82
|
-
CallTracker,
|
|
83
|
-
CallTrackerCall,
|
|
84
|
-
CallTrackerReportInformation,
|
|
85
79
|
deepStrictEqual,
|
|
86
80
|
deepStrictEqual as deepEqual,
|
|
87
81
|
doesNotMatch,
|
|
@@ -105,7 +99,7 @@ declare module "assert/strict" {
|
|
|
105
99
|
}
|
|
106
100
|
export = strict;
|
|
107
101
|
}
|
|
108
|
-
declare module "
|
|
109
|
-
import strict = require("assert/strict");
|
|
102
|
+
declare module "assert/strict" {
|
|
103
|
+
import strict = require("node:assert/strict");
|
|
110
104
|
export = strict;
|
|
111
105
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The `node:assert` module provides a set of assertion functions for verifying
|
|
3
3
|
* invariants.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
4
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/assert.js)
|
|
5
5
|
*/
|
|
6
|
-
declare module "assert" {
|
|
7
|
-
import strict = require("assert/strict");
|
|
6
|
+
declare module "node:assert" {
|
|
7
|
+
import strict = require("node:assert/strict");
|
|
8
8
|
/**
|
|
9
9
|
* An alias of {@link assert.ok}.
|
|
10
10
|
* @since v0.5.9
|
|
@@ -182,154 +182,6 @@ declare module "assert" {
|
|
|
182
182
|
*/
|
|
183
183
|
operator: string;
|
|
184
184
|
}
|
|
185
|
-
/**
|
|
186
|
-
* This feature is deprecated and will be removed in a future version.
|
|
187
|
-
* Please consider using alternatives such as the `mock` helper function.
|
|
188
|
-
* @since v14.2.0, v12.19.0
|
|
189
|
-
* @deprecated Deprecated
|
|
190
|
-
*/
|
|
191
|
-
class CallTracker {
|
|
192
|
-
/**
|
|
193
|
-
* The wrapper function is expected to be called exactly `exact` times. If the
|
|
194
|
-
* function has not been called exactly `exact` times when `tracker.verify()` is called, then `tracker.verify()` will throw an
|
|
195
|
-
* error.
|
|
196
|
-
*
|
|
197
|
-
* ```js
|
|
198
|
-
* import assert from 'node:assert';
|
|
199
|
-
*
|
|
200
|
-
* // Creates call tracker.
|
|
201
|
-
* const tracker = new assert.CallTracker();
|
|
202
|
-
*
|
|
203
|
-
* function func() {}
|
|
204
|
-
*
|
|
205
|
-
* // Returns a function that wraps func() that must be called exact times
|
|
206
|
-
* // before tracker.verify().
|
|
207
|
-
* const callsfunc = tracker.calls(func);
|
|
208
|
-
* ```
|
|
209
|
-
* @since v14.2.0, v12.19.0
|
|
210
|
-
* @param [fn='A no-op function']
|
|
211
|
-
* @param [exact=1]
|
|
212
|
-
* @return A function that wraps `fn`.
|
|
213
|
-
*/
|
|
214
|
-
calls(exact?: number): () => void;
|
|
215
|
-
calls(fn: undefined, exact?: number): () => void;
|
|
216
|
-
calls<Func extends (...args: any[]) => any>(fn: Func, exact?: number): Func;
|
|
217
|
-
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func | (() => void);
|
|
218
|
-
/**
|
|
219
|
-
* Example:
|
|
220
|
-
*
|
|
221
|
-
* ```js
|
|
222
|
-
* import assert from 'node:assert';
|
|
223
|
-
*
|
|
224
|
-
* const tracker = new assert.CallTracker();
|
|
225
|
-
*
|
|
226
|
-
* function func() {}
|
|
227
|
-
* const callsfunc = tracker.calls(func);
|
|
228
|
-
* callsfunc(1, 2, 3);
|
|
229
|
-
*
|
|
230
|
-
* assert.deepStrictEqual(tracker.getCalls(callsfunc),
|
|
231
|
-
* [{ thisArg: undefined, arguments: [1, 2, 3] }]);
|
|
232
|
-
* ```
|
|
233
|
-
* @since v18.8.0, v16.18.0
|
|
234
|
-
* @return An array with all the calls to a tracked function.
|
|
235
|
-
*/
|
|
236
|
-
getCalls(fn: Function): CallTrackerCall[];
|
|
237
|
-
/**
|
|
238
|
-
* The arrays contains information about the expected and actual number of calls of
|
|
239
|
-
* the functions that have not been called the expected number of times.
|
|
240
|
-
*
|
|
241
|
-
* ```js
|
|
242
|
-
* import assert from 'node:assert';
|
|
243
|
-
*
|
|
244
|
-
* // Creates call tracker.
|
|
245
|
-
* const tracker = new assert.CallTracker();
|
|
246
|
-
*
|
|
247
|
-
* function func() {}
|
|
248
|
-
*
|
|
249
|
-
* // Returns a function that wraps func() that must be called exact times
|
|
250
|
-
* // before tracker.verify().
|
|
251
|
-
* const callsfunc = tracker.calls(func, 2);
|
|
252
|
-
*
|
|
253
|
-
* // Returns an array containing information on callsfunc()
|
|
254
|
-
* console.log(tracker.report());
|
|
255
|
-
* // [
|
|
256
|
-
* // {
|
|
257
|
-
* // message: 'Expected the func function to be executed 2 time(s) but was
|
|
258
|
-
* // executed 0 time(s).',
|
|
259
|
-
* // actual: 0,
|
|
260
|
-
* // expected: 2,
|
|
261
|
-
* // operator: 'func',
|
|
262
|
-
* // stack: stack trace
|
|
263
|
-
* // }
|
|
264
|
-
* // ]
|
|
265
|
-
* ```
|
|
266
|
-
* @since v14.2.0, v12.19.0
|
|
267
|
-
* @return An array of objects containing information about the wrapper functions returned by {@link tracker.calls()}.
|
|
268
|
-
*/
|
|
269
|
-
report(): CallTrackerReportInformation[];
|
|
270
|
-
/**
|
|
271
|
-
* Reset calls of the call tracker. If a tracked function is passed as an argument, the calls will be reset for it.
|
|
272
|
-
* If no arguments are passed, all tracked functions will be reset.
|
|
273
|
-
*
|
|
274
|
-
* ```js
|
|
275
|
-
* import assert from 'node:assert';
|
|
276
|
-
*
|
|
277
|
-
* const tracker = new assert.CallTracker();
|
|
278
|
-
*
|
|
279
|
-
* function func() {}
|
|
280
|
-
* const callsfunc = tracker.calls(func);
|
|
281
|
-
*
|
|
282
|
-
* callsfunc();
|
|
283
|
-
* // Tracker was called once
|
|
284
|
-
* assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
|
|
285
|
-
*
|
|
286
|
-
* tracker.reset(callsfunc);
|
|
287
|
-
* assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
|
|
288
|
-
* ```
|
|
289
|
-
* @since v18.8.0, v16.18.0
|
|
290
|
-
* @param fn a tracked function to reset.
|
|
291
|
-
*/
|
|
292
|
-
reset(fn?: Function): void;
|
|
293
|
-
/**
|
|
294
|
-
* Iterates through the list of functions passed to {@link tracker.calls()} and will throw an error for functions that
|
|
295
|
-
* have not been called the expected number of times.
|
|
296
|
-
*
|
|
297
|
-
* ```js
|
|
298
|
-
* import assert from 'node:assert';
|
|
299
|
-
*
|
|
300
|
-
* // Creates call tracker.
|
|
301
|
-
* const tracker = new assert.CallTracker();
|
|
302
|
-
*
|
|
303
|
-
* function func() {}
|
|
304
|
-
*
|
|
305
|
-
* // Returns a function that wraps func() that must be called exact times
|
|
306
|
-
* // before tracker.verify().
|
|
307
|
-
* const callsfunc = tracker.calls(func, 2);
|
|
308
|
-
*
|
|
309
|
-
* callsfunc();
|
|
310
|
-
*
|
|
311
|
-
* // Will throw an error since callsfunc() was only called once.
|
|
312
|
-
* tracker.verify();
|
|
313
|
-
* ```
|
|
314
|
-
* @since v14.2.0, v12.19.0
|
|
315
|
-
*/
|
|
316
|
-
verify(): void;
|
|
317
|
-
}
|
|
318
|
-
interface CallTrackerCall {
|
|
319
|
-
thisArg: object;
|
|
320
|
-
arguments: unknown[];
|
|
321
|
-
}
|
|
322
|
-
interface CallTrackerReportInformation {
|
|
323
|
-
message: string;
|
|
324
|
-
/** The actual number of times the function was called. */
|
|
325
|
-
actual: number;
|
|
326
|
-
/** The number of times the function was expected to be called. */
|
|
327
|
-
expected: number;
|
|
328
|
-
/** The name of the function that is wrapped. */
|
|
329
|
-
operator: string;
|
|
330
|
-
/** A stack trace of the function. */
|
|
331
|
-
stack: object;
|
|
332
|
-
}
|
|
333
185
|
type AssertPredicate = RegExp | (new() => object) | ((thrown: unknown) => boolean) | object | Error;
|
|
334
186
|
/**
|
|
335
187
|
* Throws an `AssertionError` with the provided error message or a default
|
|
@@ -348,22 +200,10 @@ declare module "assert" {
|
|
|
348
200
|
* assert.fail(new TypeError('need array'));
|
|
349
201
|
* // TypeError: need array
|
|
350
202
|
* ```
|
|
351
|
-
*
|
|
352
|
-
* Using `assert.fail()` with more than two arguments is possible but deprecated.
|
|
353
|
-
* See below for further details.
|
|
354
203
|
* @since v0.1.21
|
|
355
204
|
* @param [message='Failed']
|
|
356
205
|
*/
|
|
357
206
|
function fail(message?: string | Error): never;
|
|
358
|
-
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
359
|
-
function fail(
|
|
360
|
-
actual: unknown,
|
|
361
|
-
expected: unknown,
|
|
362
|
-
message?: string | Error,
|
|
363
|
-
operator?: string,
|
|
364
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
365
|
-
stackStartFn?: Function,
|
|
366
|
-
): never;
|
|
367
207
|
/**
|
|
368
208
|
* Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.
|
|
369
209
|
*
|
|
@@ -931,7 +771,7 @@ declare module "assert" {
|
|
|
931
771
|
* check that the promise is rejected.
|
|
932
772
|
*
|
|
933
773
|
* If `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the
|
|
934
|
-
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-
|
|
774
|
+
* function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value)
|
|
935
775
|
* error. In both cases the error handler is skipped.
|
|
936
776
|
*
|
|
937
777
|
* Besides the async nature to await the completion behaves identically to {@link throws}.
|
|
@@ -1001,7 +841,7 @@ declare module "assert" {
|
|
|
1001
841
|
*
|
|
1002
842
|
* If `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If
|
|
1003
843
|
* the function does not return a promise, `assert.doesNotReject()` will return a
|
|
1004
|
-
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-
|
|
844
|
+
* rejected `Promise` with an [ERR_INVALID_RETURN_VALUE](https://nodejs.org/docs/latest-v25.x/api/errors.html#err_invalid_return_value) error. In both cases
|
|
1005
845
|
* the error handler is skipped.
|
|
1006
846
|
*
|
|
1007
847
|
* Using `assert.doesNotReject()` is actually not useful because there is little
|
|
@@ -1064,7 +904,7 @@ declare module "assert" {
|
|
|
1064
904
|
* If the values do not match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
|
|
1065
905
|
* to the value of the `message` parameter. If the `message` parameter is
|
|
1066
906
|
* undefined, a default error message is assigned. If the `message` parameter is an
|
|
1067
|
-
* instance of an [Error](https://nodejs.org/docs/latest-
|
|
907
|
+
* instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
|
1068
908
|
* @since v13.6.0, v12.16.0
|
|
1069
909
|
*/
|
|
1070
910
|
function match(value: string, regExp: RegExp, message?: string | Error): void;
|
|
@@ -1087,7 +927,7 @@ declare module "assert" {
|
|
|
1087
927
|
* If the values do match, or if the `string` argument is of another type than `string`, an `{@link AssertionError}` is thrown with a `message` property set equal
|
|
1088
928
|
* to the value of the `message` parameter. If the `message` parameter is
|
|
1089
929
|
* undefined, a default error message is assigned. If the `message` parameter is an
|
|
1090
|
-
* instance of an [Error](https://nodejs.org/docs/latest-
|
|
930
|
+
* instance of an [Error](https://nodejs.org/docs/latest-v25.x/api/errors.html#class-error) then it will be thrown instead of the `{@link AssertionError}`.
|
|
1091
931
|
* @since v13.6.0, v12.16.0
|
|
1092
932
|
*/
|
|
1093
933
|
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
|
|
@@ -1109,7 +949,7 @@ declare module "assert" {
|
|
|
1109
949
|
}
|
|
1110
950
|
export = assert;
|
|
1111
951
|
}
|
|
1112
|
-
declare module "
|
|
1113
|
-
import assert = require("assert");
|
|
952
|
+
declare module "assert" {
|
|
953
|
+
import assert = require("node:assert");
|
|
1114
954
|
export = assert;
|
|
1115
955
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* We strongly discourage the use of the `async_hooks` API.
|
|
3
3
|
* Other APIs that can cover most of its use cases include:
|
|
4
4
|
*
|
|
5
|
-
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-
|
|
6
|
-
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-
|
|
5
|
+
* * [`AsyncLocalStorage`](https://nodejs.org/docs/latest-v25.x/api/async_context.html#class-asynclocalstorage) tracks async context
|
|
6
|
+
* * [`process.getActiveResourcesInfo()`](https://nodejs.org/docs/latest-v25.x/api/process.html#processgetactiveresourcesinfo) tracks active resources
|
|
7
7
|
*
|
|
8
8
|
* The `node:async_hooks` module provides an API to track asynchronous resources.
|
|
9
9
|
* It can be accessed using:
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* import async_hooks from 'node:async_hooks';
|
|
13
13
|
* ```
|
|
14
14
|
* @experimental
|
|
15
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
15
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/async_hooks.js)
|
|
16
16
|
*/
|
|
17
|
-
declare module "async_hooks" {
|
|
17
|
+
declare module "node:async_hooks" {
|
|
18
18
|
/**
|
|
19
19
|
* ```js
|
|
20
20
|
* import { executionAsyncId } from 'node:async_hooks';
|
|
@@ -44,7 +44,7 @@ declare module "async_hooks" {
|
|
|
44
44
|
* ```
|
|
45
45
|
*
|
|
46
46
|
* Promise contexts may not get precise `executionAsyncIds` by default.
|
|
47
|
-
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-
|
|
47
|
+
* See the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
|
|
48
48
|
* @since v8.1.0
|
|
49
49
|
* @return The `asyncId` of the current execution context. Useful to track when something calls.
|
|
50
50
|
*/
|
|
@@ -117,7 +117,7 @@ declare module "async_hooks" {
|
|
|
117
117
|
* ```
|
|
118
118
|
*
|
|
119
119
|
* Promise contexts may not get valid `triggerAsyncId`s by default. See
|
|
120
|
-
* the section on [promise execution tracking](https://nodejs.org/docs/latest-
|
|
120
|
+
* the section on [promise execution tracking](https://nodejs.org/docs/latest-v25.x/api/async_hooks.html#promise-execution-tracking).
|
|
121
121
|
* @return The ID of the resource responsible for calling the callback that is currently being executed.
|
|
122
122
|
*/
|
|
123
123
|
function triggerAsyncId(): number;
|
|
@@ -618,6 +618,6 @@ declare module "async_hooks" {
|
|
|
618
618
|
const VERIFYREQUEST: number;
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
declare module "
|
|
622
|
-
export * from "async_hooks";
|
|
621
|
+
declare module "async_hooks" {
|
|
622
|
+
export * from "node:async_hooks";
|
|
623
623
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module "buffer" {
|
|
1
|
+
declare module "node:buffer" {
|
|
2
2
|
type ImplicitArrayBuffer<T extends WithImplicitCoercion<ArrayBufferLike>> = T extends
|
|
3
3
|
{ valueOf(): infer V extends ArrayBufferLike } ? V : T;
|
|
4
4
|
global {
|
|
@@ -463,10 +463,4 @@ declare module "buffer" {
|
|
|
463
463
|
*/
|
|
464
464
|
type AllowSharedBuffer = Buffer<ArrayBufferLike>;
|
|
465
465
|
}
|
|
466
|
-
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
467
|
-
var SlowBuffer: {
|
|
468
|
-
/** @deprecated Use `Buffer.allocUnsafeSlow()` instead. */
|
|
469
|
-
new(size: number): Buffer<ArrayBuffer>;
|
|
470
|
-
prototype: Buffer;
|
|
471
|
-
};
|
|
472
466
|
}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
// If lib.dom.d.ts or lib.webworker.d.ts is loaded, then use the global types.
|
|
2
|
-
// Otherwise, use the types from node.
|
|
3
|
-
type _Blob = typeof globalThis extends { onmessage: any; Blob: any } ? {} : import("buffer").Blob;
|
|
4
|
-
type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : import("buffer").File;
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* `Buffer` objects are used to represent a fixed-length sequence of bytes. Many
|
|
8
3
|
* Node.js APIs support `Buffer`s.
|
|
@@ -46,11 +41,10 @@ type _File = typeof globalThis extends { onmessage: any; File: any } ? {} : impo
|
|
|
46
41
|
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
|
|
47
42
|
* const buf7 = Buffer.from('tést', 'latin1');
|
|
48
43
|
* ```
|
|
49
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
44
|
+
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/buffer.js)
|
|
50
45
|
*/
|
|
51
|
-
declare module "buffer" {
|
|
52
|
-
import {
|
|
53
|
-
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
|
46
|
+
declare module "node:buffer" {
|
|
47
|
+
import { ReadableStream } from "node:stream/web";
|
|
54
48
|
/**
|
|
55
49
|
* This function returns `true` if `input` contains only valid UTF-8-encoded data,
|
|
56
50
|
* including the case in which `input` is empty.
|
|
@@ -126,115 +120,11 @@ declare module "buffer" {
|
|
|
126
120
|
*/
|
|
127
121
|
export function resolveObjectURL(id: string): Blob | undefined;
|
|
128
122
|
export { type AllowSharedBuffer, Buffer, type NonSharedBuffer };
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
|
|
135
|
-
* will be converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
|
|
136
|
-
*/
|
|
137
|
-
endings?: "transparent" | "native";
|
|
138
|
-
/**
|
|
139
|
-
* The Blob content-type. The intent is for `type` to convey
|
|
140
|
-
* the MIME media type of the data, however no validation of the type format
|
|
141
|
-
* is performed.
|
|
142
|
-
*/
|
|
143
|
-
type?: string | undefined;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* A `Blob` encapsulates immutable, raw data that can be safely shared across
|
|
147
|
-
* multiple worker threads.
|
|
148
|
-
* @since v15.7.0, v14.18.0
|
|
149
|
-
*/
|
|
150
|
-
export class Blob {
|
|
151
|
-
/**
|
|
152
|
-
* The total size of the `Blob` in bytes.
|
|
153
|
-
* @since v15.7.0, v14.18.0
|
|
154
|
-
*/
|
|
155
|
-
readonly size: number;
|
|
156
|
-
/**
|
|
157
|
-
* The content-type of the `Blob`.
|
|
158
|
-
* @since v15.7.0, v14.18.0
|
|
159
|
-
*/
|
|
160
|
-
readonly type: string;
|
|
161
|
-
/**
|
|
162
|
-
* Creates a new `Blob` object containing a concatenation of the given sources.
|
|
163
|
-
*
|
|
164
|
-
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
|
165
|
-
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
|
166
|
-
*
|
|
167
|
-
* String sources are also copied into the `Blob`.
|
|
168
|
-
*/
|
|
169
|
-
constructor(sources: Array<ArrayBuffer | BinaryLike | Blob>, options?: BlobOptions);
|
|
170
|
-
/**
|
|
171
|
-
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
172
|
-
* the `Blob` data.
|
|
173
|
-
* @since v15.7.0, v14.18.0
|
|
174
|
-
*/
|
|
175
|
-
arrayBuffer(): Promise<ArrayBuffer>;
|
|
176
|
-
/**
|
|
177
|
-
* The `blob.bytes()` method returns the byte of the `Blob` object as a `Promise<Uint8Array>`.
|
|
178
|
-
*
|
|
179
|
-
* ```js
|
|
180
|
-
* const blob = new Blob(['hello']);
|
|
181
|
-
* blob.bytes().then((bytes) => {
|
|
182
|
-
* console.log(bytes); // Outputs: Uint8Array(5) [ 104, 101, 108, 108, 111 ]
|
|
183
|
-
* });
|
|
184
|
-
* ```
|
|
185
|
-
*/
|
|
186
|
-
bytes(): Promise<Uint8Array>;
|
|
187
|
-
/**
|
|
188
|
-
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
|
189
|
-
* data. The original `Blob` is not altered.
|
|
190
|
-
* @since v15.7.0, v14.18.0
|
|
191
|
-
* @param start The starting index.
|
|
192
|
-
* @param end The ending index.
|
|
193
|
-
* @param type The content-type for the new `Blob`
|
|
194
|
-
*/
|
|
195
|
-
slice(start?: number, end?: number, type?: string): Blob;
|
|
196
|
-
/**
|
|
197
|
-
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
|
198
|
-
* UTF-8 string.
|
|
199
|
-
* @since v15.7.0, v14.18.0
|
|
200
|
-
*/
|
|
201
|
-
text(): Promise<string>;
|
|
202
|
-
/**
|
|
203
|
-
* Returns a new `ReadableStream` that allows the content of the `Blob` to be read.
|
|
204
|
-
* @since v16.7.0
|
|
205
|
-
*/
|
|
206
|
-
stream(): WebReadableStream;
|
|
207
|
-
}
|
|
208
|
-
export interface FileOptions {
|
|
209
|
-
/**
|
|
210
|
-
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
|
|
211
|
-
* converted to the platform native line-ending as specified by `import { EOL } from 'node:os'`.
|
|
212
|
-
*/
|
|
213
|
-
endings?: "native" | "transparent";
|
|
214
|
-
/** The File content-type. */
|
|
215
|
-
type?: string;
|
|
216
|
-
/** The last modified date of the file. `Default`: Date.now(). */
|
|
217
|
-
lastModified?: number;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) provides information about files.
|
|
221
|
-
* @since v19.2.0, v18.13.0
|
|
222
|
-
*/
|
|
223
|
-
export class File extends Blob {
|
|
224
|
-
constructor(sources: Array<BinaryLike | Blob>, fileName: string, options?: FileOptions);
|
|
225
|
-
/**
|
|
226
|
-
* The name of the `File`.
|
|
227
|
-
* @since v19.2.0, v18.13.0
|
|
228
|
-
*/
|
|
229
|
-
readonly name: string;
|
|
230
|
-
/**
|
|
231
|
-
* The last modified date of the `File`.
|
|
232
|
-
* @since v19.2.0, v18.13.0
|
|
233
|
-
*/
|
|
234
|
-
readonly lastModified: number;
|
|
235
|
-
}
|
|
236
|
-
export import atob = globalThis.atob;
|
|
237
|
-
export import btoa = globalThis.btoa;
|
|
123
|
+
/** @deprecated This alias will be removed in a future version. Use the canonical `BlobPropertyBag` instead. */
|
|
124
|
+
// TODO: remove in future major
|
|
125
|
+
export interface BlobOptions extends BlobPropertyBag {}
|
|
126
|
+
/** @deprecated This alias will be removed in a future version. Use the canonical `FilePropertyBag` instead. */
|
|
127
|
+
export interface FileOptions extends FilePropertyBag {}
|
|
238
128
|
export type WithImplicitCoercion<T> =
|
|
239
129
|
| T
|
|
240
130
|
| { valueOf(): T }
|
|
@@ -1879,56 +1769,42 @@ declare module "buffer" {
|
|
|
1879
1769
|
includes(value: string | number | Buffer, encoding: BufferEncoding): boolean;
|
|
1880
1770
|
}
|
|
1881
1771
|
var Buffer: BufferConstructor;
|
|
1882
|
-
/**
|
|
1883
|
-
* Decodes a string of Base64-encoded data into bytes, and encodes those bytes
|
|
1884
|
-
* into a string using Latin-1 (ISO-8859-1).
|
|
1885
|
-
*
|
|
1886
|
-
* The `data` may be any JavaScript-value that can be coerced into a string.
|
|
1887
|
-
*
|
|
1888
|
-
* **This function is only provided for compatibility with legacy web platform APIs**
|
|
1889
|
-
* **and should never be used in new code, because they use strings to represent**
|
|
1890
|
-
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
|
1891
|
-
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
|
1892
|
-
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
|
|
1893
|
-
* @since v15.13.0, v14.17.0
|
|
1894
|
-
* @legacy Use `Buffer.from(data, 'base64')` instead.
|
|
1895
|
-
* @param data The Base64-encoded input string.
|
|
1896
|
-
*/
|
|
1897
|
-
function atob(data: string): string;
|
|
1898
|
-
/**
|
|
1899
|
-
* Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes
|
|
1900
|
-
* into a string using Base64.
|
|
1901
|
-
*
|
|
1902
|
-
* The `data` may be any JavaScript-value that can be coerced into a string.
|
|
1903
|
-
*
|
|
1904
|
-
* **This function is only provided for compatibility with legacy web platform APIs**
|
|
1905
|
-
* **and should never be used in new code, because they use strings to represent**
|
|
1906
|
-
* **binary data and predate the introduction of typed arrays in JavaScript.**
|
|
1907
|
-
* **For code running using Node.js APIs, converting between base64-encoded strings**
|
|
1908
|
-
* **and binary data should be performed using `Buffer.from(str, 'base64')` and `buf.toString('base64')`.**
|
|
1909
|
-
* @since v15.13.0, v14.17.0
|
|
1910
|
-
* @legacy Use `buf.toString('base64')` instead.
|
|
1911
|
-
* @param data An ASCII (Latin1) string.
|
|
1912
|
-
*/
|
|
1913
|
-
function btoa(data: string): string;
|
|
1914
|
-
interface Blob extends _Blob {}
|
|
1915
|
-
/**
|
|
1916
|
-
* `Blob` class is a global reference for `import { Blob } from 'node:buffer'`
|
|
1917
|
-
* https://nodejs.org/api/buffer.html#class-blob
|
|
1918
|
-
* @since v18.0.0
|
|
1919
|
-
*/
|
|
1920
|
-
var Blob: typeof globalThis extends { onmessage: any; Blob: infer T } ? T
|
|
1921
|
-
: typeof import("buffer").Blob;
|
|
1922
|
-
interface File extends _File {}
|
|
1923
|
-
/**
|
|
1924
|
-
* `File` class is a global reference for `import { File } from 'node:buffer'`
|
|
1925
|
-
* https://nodejs.org/api/buffer.html#class-file
|
|
1926
|
-
* @since v20.0.0
|
|
1927
|
-
*/
|
|
1928
|
-
var File: typeof globalThis extends { onmessage: any; File: infer T } ? T
|
|
1929
|
-
: typeof import("buffer").File;
|
|
1930
1772
|
}
|
|
1773
|
+
// #region web types
|
|
1774
|
+
export type BlobPart = NodeJS.BufferSource | Blob | string;
|
|
1775
|
+
export interface BlobPropertyBag {
|
|
1776
|
+
endings?: "native" | "transparent";
|
|
1777
|
+
type?: string;
|
|
1778
|
+
}
|
|
1779
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
1780
|
+
lastModified?: number;
|
|
1781
|
+
}
|
|
1782
|
+
export interface Blob {
|
|
1783
|
+
readonly size: number;
|
|
1784
|
+
readonly type: string;
|
|
1785
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1786
|
+
bytes(): Promise<NodeJS.NonSharedUint8Array>;
|
|
1787
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
1788
|
+
stream(): ReadableStream<NodeJS.NonSharedUint8Array>;
|
|
1789
|
+
text(): Promise<string>;
|
|
1790
|
+
}
|
|
1791
|
+
export var Blob: {
|
|
1792
|
+
prototype: Blob;
|
|
1793
|
+
new(blobParts?: BlobPart[], options?: BlobPropertyBag): Blob;
|
|
1794
|
+
};
|
|
1795
|
+
export interface File extends Blob {
|
|
1796
|
+
readonly lastModified: number;
|
|
1797
|
+
readonly name: string;
|
|
1798
|
+
readonly webkitRelativePath: string;
|
|
1799
|
+
}
|
|
1800
|
+
export var File: {
|
|
1801
|
+
prototype: File;
|
|
1802
|
+
new(fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
|
|
1803
|
+
};
|
|
1804
|
+
export import atob = globalThis.atob;
|
|
1805
|
+
export import btoa = globalThis.btoa;
|
|
1806
|
+
// #endregion
|
|
1931
1807
|
}
|
|
1932
|
-
declare module "
|
|
1933
|
-
export * from "buffer";
|
|
1808
|
+
declare module "buffer" {
|
|
1809
|
+
export * from "node:buffer";
|
|
1934
1810
|
}
|