cdk-common 2.0.490 → 2.0.491
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 +2 -2
- package/lib/main.js +1 -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.d.ts +15 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/async_hooks.d.ts +3 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns/promises.d.ts +44 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/dns.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/events.d.ts +49 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +36 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline/promises.d.ts +59 -59
- package/node_modules/@types/concat-stream/node_modules/@types/node/readline.d.ts +17 -144
- package/node_modules/@types/concat-stream/node_modules/@types/node/repl.d.ts +11 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/timers.d.ts +120 -6
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/assert.d.ts +15 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/async_hooks.d.ts +3 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/dns/promises.d.ts +44 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/dns.d.ts +1 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/events.d.ts +49 -7
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/fs.d.ts +36 -5
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/readline/promises.d.ts +59 -59
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/readline.d.ts +17 -144
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/repl.d.ts +11 -11
- package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/timers.d.ts +120 -6
- 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.d.ts +15 -0
- package/node_modules/@types/form-data/node_modules/@types/node/async_hooks.d.ts +3 -11
- package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/dns/promises.d.ts +44 -0
- package/node_modules/@types/form-data/node_modules/@types/node/dns.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/events.d.ts +49 -7
- package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +36 -5
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/readline/promises.d.ts +59 -59
- package/node_modules/@types/form-data/node_modules/@types/node/readline.d.ts +17 -144
- package/node_modules/@types/form-data/node_modules/@types/node/repl.d.ts +11 -11
- package/node_modules/@types/form-data/node_modules/@types/node/timers.d.ts +120 -6
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/assert.d.ts +15 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/async_hooks.d.ts +3 -11
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/dns/promises.d.ts +44 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/dns.d.ts +1 -0
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/events.d.ts +49 -7
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/fs.d.ts +36 -5
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/readline/promises.d.ts +59 -59
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/readline.d.ts +17 -144
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/repl.d.ts +11 -11
- package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/timers.d.ts +120 -6
- package/package.json +2 -2
|
@@ -41,8 +41,8 @@ declare module 'repl' {
|
|
|
41
41
|
* error with `repl.Recoverable` to indicate the input was incomplete and prompt for
|
|
42
42
|
* additional lines.
|
|
43
43
|
*
|
|
44
|
-
* @see https://nodejs.org/dist/latest-
|
|
45
|
-
* @see https://nodejs.org/dist/latest-
|
|
44
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_default_evaluation
|
|
45
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_custom_evaluation_functions
|
|
46
46
|
*/
|
|
47
47
|
eval?: REPLEval | undefined;
|
|
48
48
|
/**
|
|
@@ -74,13 +74,13 @@ declare module 'repl' {
|
|
|
74
74
|
* The function to invoke to format the output of each command before writing to `output`.
|
|
75
75
|
* Default: a wrapper for `util.inspect`.
|
|
76
76
|
*
|
|
77
|
-
* @see https://nodejs.org/dist/latest-
|
|
77
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_customizing_repl_output
|
|
78
78
|
*/
|
|
79
79
|
writer?: REPLWriter | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* An optional function used for custom Tab auto completion.
|
|
82
82
|
*
|
|
83
|
-
* @see https://nodejs.org/dist/latest-
|
|
83
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/readline.html#readline_use_of_the_completer_function
|
|
84
84
|
*/
|
|
85
85
|
completer?: Completer | AsyncCompleter | undefined;
|
|
86
86
|
/**
|
|
@@ -162,33 +162,33 @@ declare module 'repl' {
|
|
|
162
162
|
/**
|
|
163
163
|
* A value indicating whether the REPL is currently in "editor mode".
|
|
164
164
|
*
|
|
165
|
-
* @see https://nodejs.org/dist/latest-
|
|
165
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_commands_and_special_keys
|
|
166
166
|
*/
|
|
167
167
|
readonly editorMode: boolean;
|
|
168
168
|
/**
|
|
169
169
|
* A value indicating whether the `_` variable has been assigned.
|
|
170
170
|
*
|
|
171
|
-
* @see https://nodejs.org/dist/latest-
|
|
171
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
172
172
|
*/
|
|
173
173
|
readonly underscoreAssigned: boolean;
|
|
174
174
|
/**
|
|
175
175
|
* The last evaluation result from the REPL (assigned to the `_` variable inside of the REPL).
|
|
176
176
|
*
|
|
177
|
-
* @see https://nodejs.org/dist/latest-
|
|
177
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
178
178
|
*/
|
|
179
179
|
readonly last: any;
|
|
180
180
|
/**
|
|
181
181
|
* A value indicating whether the `_error` variable has been assigned.
|
|
182
182
|
*
|
|
183
183
|
* @since v9.8.0
|
|
184
|
-
* @see https://nodejs.org/dist/latest-
|
|
184
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
185
185
|
*/
|
|
186
186
|
readonly underscoreErrAssigned: boolean;
|
|
187
187
|
/**
|
|
188
188
|
* The last error raised inside the REPL (assigned to the `_error` variable inside of the REPL).
|
|
189
189
|
*
|
|
190
190
|
* @since v9.8.0
|
|
191
|
-
* @see https://nodejs.org/dist/latest-
|
|
191
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_assignment_of_the_underscore_variable
|
|
192
192
|
*/
|
|
193
193
|
readonly lastError: any;
|
|
194
194
|
/**
|
|
@@ -240,7 +240,7 @@ declare module 'repl' {
|
|
|
240
240
|
*
|
|
241
241
|
* `REPLServer` cannot be subclassed due to implementation specifics in NodeJS.
|
|
242
242
|
*
|
|
243
|
-
* @see https://nodejs.org/dist/latest-
|
|
243
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_class_replserver
|
|
244
244
|
*/
|
|
245
245
|
private constructor();
|
|
246
246
|
/**
|
|
@@ -412,7 +412,7 @@ declare module 'repl' {
|
|
|
412
412
|
/**
|
|
413
413
|
* Indicates a recoverable error that a `REPLServer` can use to support multi-line input.
|
|
414
414
|
*
|
|
415
|
-
* @see https://nodejs.org/dist/latest-
|
|
415
|
+
* @see https://nodejs.org/dist/latest-v20.x/docs/api/repl.html#repl_recoverable_errors
|
|
416
416
|
*/
|
|
417
417
|
class Recoverable extends SyntaxError {
|
|
418
418
|
err: Error;
|
|
@@ -33,7 +33,35 @@ declare module 'timers' {
|
|
|
33
33
|
refresh(): this;
|
|
34
34
|
[Symbol.toPrimitive](): number;
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* This object is created internally and is returned from `setImmediate()`. It
|
|
38
|
+
* can be passed to `clearImmediate()` in order to cancel the scheduled
|
|
39
|
+
* actions.
|
|
40
|
+
*
|
|
41
|
+
* By default, when an immediate is scheduled, the Node.js event loop will continue
|
|
42
|
+
* running as long as the immediate is active. The `Immediate` object returned by `setImmediate()` exports both `immediate.ref()` and `immediate.unref()`functions that can be used to
|
|
43
|
+
* control this default behavior.
|
|
44
|
+
*/
|
|
45
|
+
class Immediate implements RefCounted {
|
|
46
|
+
/**
|
|
47
|
+
* When called, requests that the Node.js event loop _not_ exit so long as the`Immediate` is active. Calling `immediate.ref()` multiple times will have no
|
|
48
|
+
* effect.
|
|
49
|
+
*
|
|
50
|
+
* By default, all `Immediate` objects are "ref'ed", making it normally unnecessary
|
|
51
|
+
* to call `immediate.ref()` unless `immediate.unref()` had been called previously.
|
|
52
|
+
* @since v9.7.0
|
|
53
|
+
* @return a reference to `immediate`
|
|
54
|
+
*/
|
|
55
|
+
ref(): this;
|
|
56
|
+
/**
|
|
57
|
+
* When called, the active `Immediate` object will not require the Node.js event
|
|
58
|
+
* loop to remain active. If there is no other activity keeping the event loop
|
|
59
|
+
* running, the process may exit before the `Immediate` object's callback is
|
|
60
|
+
* invoked. Calling `immediate.unref()` multiple times will have no effect.
|
|
61
|
+
* @since v9.7.0
|
|
62
|
+
* @return a reference to `immediate`
|
|
63
|
+
*/
|
|
64
|
+
unref(): this;
|
|
37
65
|
/**
|
|
38
66
|
* If true, the `Immediate` object will keep the Node.js event loop active.
|
|
39
67
|
* @since v11.0.0
|
|
@@ -41,7 +69,33 @@ declare module 'timers' {
|
|
|
41
69
|
hasRef(): boolean;
|
|
42
70
|
_onImmediate: Function; // to distinguish it from the Timeout class
|
|
43
71
|
}
|
|
44
|
-
|
|
72
|
+
/**
|
|
73
|
+
* This object is created internally and is returned from `setTimeout()` and `setInterval()`. It can be passed to either `clearTimeout()` or `clearInterval()` in order to cancel the
|
|
74
|
+
* scheduled actions.
|
|
75
|
+
*
|
|
76
|
+
* By default, when a timer is scheduled using either `setTimeout()` or `setInterval()`, the Node.js event loop will continue running as long as the
|
|
77
|
+
* timer is active. Each of the `Timeout` objects returned by these functions
|
|
78
|
+
* export both `timeout.ref()` and `timeout.unref()` functions that can be used to
|
|
79
|
+
* control this default behavior.
|
|
80
|
+
*/
|
|
81
|
+
class Timeout implements Timer {
|
|
82
|
+
/**
|
|
83
|
+
* When called, requests that the Node.js event loop _not_ exit so long as the`Timeout` is active. Calling `timeout.ref()` multiple times will have no effect.
|
|
84
|
+
*
|
|
85
|
+
* By default, all `Timeout` objects are "ref'ed", making it normally unnecessary
|
|
86
|
+
* to call `timeout.ref()` unless `timeout.unref()` had been called previously.
|
|
87
|
+
* @since v0.9.1
|
|
88
|
+
* @return a reference to `timeout`
|
|
89
|
+
*/
|
|
90
|
+
ref(): this;
|
|
91
|
+
/**
|
|
92
|
+
* When called, the active `Timeout` object will not require the Node.js event loop
|
|
93
|
+
* to remain active. If there is no other activity keeping the event loop running,
|
|
94
|
+
* the process may exit before the `Timeout` object's callback is invoked. Calling`timeout.unref()` multiple times will have no effect.
|
|
95
|
+
* @since v0.9.1
|
|
96
|
+
* @return a reference to `timeout`
|
|
97
|
+
*/
|
|
98
|
+
unref(): this;
|
|
45
99
|
/**
|
|
46
100
|
* If true, the `Timeout` object will keep the Node.js event loop active.
|
|
47
101
|
* @since v11.0.0
|
|
@@ -63,11 +117,23 @@ declare module 'timers' {
|
|
|
63
117
|
}
|
|
64
118
|
}
|
|
65
119
|
/**
|
|
66
|
-
* Schedules execution of a one-time `callback` after `delay` milliseconds.
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
120
|
+
* Schedules execution of a one-time `callback` after `delay` milliseconds.
|
|
121
|
+
*
|
|
122
|
+
* The `callback` will likely not be invoked in precisely `delay` milliseconds.
|
|
123
|
+
* Node.js makes no guarantees about the exact timing of when callbacks will fire,
|
|
124
|
+
* nor of their ordering. The callback will be called as close as possible to the
|
|
125
|
+
* time specified.
|
|
126
|
+
*
|
|
127
|
+
* When `delay` is larger than `2147483647` or less than `1`, the `delay`will be set to `1`. Non-integer delays are truncated to an integer.
|
|
128
|
+
*
|
|
129
|
+
* If `callback` is not a function, a `TypeError` will be thrown.
|
|
130
|
+
*
|
|
131
|
+
* This method has a custom variant for promises that is available using `timersPromises.setTimeout()`.
|
|
70
132
|
* @since v0.0.1
|
|
133
|
+
* @param callback The function to call when the timer elapses.
|
|
134
|
+
* @param [delay=1] The number of milliseconds to wait before calling the `callback`.
|
|
135
|
+
* @param args Optional arguments to pass when the `callback` is called.
|
|
136
|
+
* @return for use with {@link clearTimeout}
|
|
71
137
|
*/
|
|
72
138
|
function setTimeout<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timeout;
|
|
73
139
|
// util.promisify no rest args compability
|
|
@@ -76,7 +142,27 @@ declare module 'timers' {
|
|
|
76
142
|
namespace setTimeout {
|
|
77
143
|
const __promisify__: typeof setTimeoutPromise;
|
|
78
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Cancels a `Timeout` object created by `setTimeout()`.
|
|
147
|
+
* @since v0.0.1
|
|
148
|
+
* @param timeout A `Timeout` object as returned by {@link setTimeout} or the `primitive` of the `Timeout` object as a string or a number.
|
|
149
|
+
*/
|
|
79
150
|
function clearTimeout(timeoutId: NodeJS.Timeout | string | number | undefined): void;
|
|
151
|
+
/**
|
|
152
|
+
* Schedules repeated execution of `callback` every `delay` milliseconds.
|
|
153
|
+
*
|
|
154
|
+
* When `delay` is larger than `2147483647` or less than `1`, the `delay` will be
|
|
155
|
+
* set to `1`. Non-integer delays are truncated to an integer.
|
|
156
|
+
*
|
|
157
|
+
* If `callback` is not a function, a `TypeError` will be thrown.
|
|
158
|
+
*
|
|
159
|
+
* This method has a custom variant for promises that is available using `timersPromises.setInterval()`.
|
|
160
|
+
* @since v0.0.1
|
|
161
|
+
* @param callback The function to call when the timer elapses.
|
|
162
|
+
* @param [delay=1] The number of milliseconds to wait before calling the `callback`.
|
|
163
|
+
* @param args Optional arguments to pass when the `callback` is called.
|
|
164
|
+
* @return for use with {@link clearInterval}
|
|
165
|
+
*/
|
|
80
166
|
function setInterval<TArgs extends any[]>(callback: (...args: TArgs) => void, ms?: number, ...args: TArgs): NodeJS.Timer;
|
|
81
167
|
// util.promisify no rest args compability
|
|
82
168
|
// tslint:disable-next-line void-return
|
|
@@ -84,7 +170,30 @@ declare module 'timers' {
|
|
|
84
170
|
namespace setInterval {
|
|
85
171
|
const __promisify__: typeof setIntervalPromise;
|
|
86
172
|
}
|
|
173
|
+
/**
|
|
174
|
+
* Cancels a `Timeout` object created by `setInterval()`.
|
|
175
|
+
* @since v0.0.1
|
|
176
|
+
* @param timeout A `Timeout` object as returned by {@link setInterval} or the `primitive` of the `Timeout` object as a string or a number.
|
|
177
|
+
*/
|
|
87
178
|
function clearInterval(intervalId: NodeJS.Timeout | string | number | undefined): void;
|
|
179
|
+
/**
|
|
180
|
+
* Schedules the "immediate" execution of the `callback` after I/O events'
|
|
181
|
+
* callbacks.
|
|
182
|
+
*
|
|
183
|
+
* When multiple calls to `setImmediate()` are made, the `callback` functions are
|
|
184
|
+
* queued for execution in the order in which they are created. The entire callback
|
|
185
|
+
* queue is processed every event loop iteration. If an immediate timer is queued
|
|
186
|
+
* from inside an executing callback, that timer will not be triggered until the
|
|
187
|
+
* next event loop iteration.
|
|
188
|
+
*
|
|
189
|
+
* If `callback` is not a function, a `TypeError` will be thrown.
|
|
190
|
+
*
|
|
191
|
+
* This method has a custom variant for promises that is available using `timersPromises.setImmediate()`.
|
|
192
|
+
* @since v0.9.1
|
|
193
|
+
* @param callback The function to call at the end of this turn of the Node.js `Event Loop`
|
|
194
|
+
* @param args Optional arguments to pass when the `callback` is called.
|
|
195
|
+
* @return for use with {@link clearImmediate}
|
|
196
|
+
*/
|
|
88
197
|
function setImmediate<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
|
|
89
198
|
// util.promisify no rest args compability
|
|
90
199
|
// tslint:disable-next-line void-return
|
|
@@ -92,6 +201,11 @@ declare module 'timers' {
|
|
|
92
201
|
namespace setImmediate {
|
|
93
202
|
const __promisify__: typeof setImmediatePromise;
|
|
94
203
|
}
|
|
204
|
+
/**
|
|
205
|
+
* Cancels an `Immediate` object created by `setImmediate()`.
|
|
206
|
+
* @since v0.9.1
|
|
207
|
+
* @param immediate An `Immediate` object as returned by {@link setImmediate}.
|
|
208
|
+
*/
|
|
95
209
|
function clearImmediate(immediateId: NodeJS.Immediate | undefined): void;
|
|
96
210
|
function queueMicrotask(callback: () => void): void;
|
|
97
211
|
}
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (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: Thu, 11 May 2023 20:02:56 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
|
@@ -15,10 +15,25 @@ declare module 'assert' {
|
|
|
15
15
|
* Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
|
|
16
16
|
*/
|
|
17
17
|
class AssertionError extends Error {
|
|
18
|
+
/**
|
|
19
|
+
* Set to the `actual` argument for methods such as {@link assert.strictEqual()}.
|
|
20
|
+
*/
|
|
18
21
|
actual: unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Set to the `expected` argument for methods such as {@link assert.strictEqual()}.
|
|
24
|
+
*/
|
|
19
25
|
expected: unknown;
|
|
26
|
+
/**
|
|
27
|
+
* Set to the passed in operator value.
|
|
28
|
+
*/
|
|
20
29
|
operator: string;
|
|
30
|
+
/**
|
|
31
|
+
* Indicates if the message was auto-generated (`true`) or not.
|
|
32
|
+
*/
|
|
21
33
|
generatedMessage: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Value is always `ERR_ASSERTION` to show that the error is an assertion error.
|
|
36
|
+
*/
|
|
22
37
|
code: 'ERR_ASSERTION';
|
|
23
38
|
constructor(options?: {
|
|
24
39
|
/** If provided, the error message is set to this value. */
|
|
@@ -274,19 +274,13 @@ declare module 'async_hooks' {
|
|
|
274
274
|
* @param fn The function to bind to the current execution context.
|
|
275
275
|
* @param type An optional name to associate with the underlying `AsyncResource`.
|
|
276
276
|
*/
|
|
277
|
-
static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(
|
|
278
|
-
fn: Func,
|
|
279
|
-
type?: string,
|
|
280
|
-
thisArg?: ThisArg
|
|
281
|
-
): Func;
|
|
277
|
+
static bind<Func extends (this: ThisArg, ...args: any[]) => any, ThisArg>(fn: Func, type?: string, thisArg?: ThisArg): Func;
|
|
282
278
|
/**
|
|
283
279
|
* Binds the given function to execute to this `AsyncResource`'s scope.
|
|
284
280
|
* @since v14.8.0, v12.19.0
|
|
285
281
|
* @param fn The function to bind to the current `AsyncResource`.
|
|
286
282
|
*/
|
|
287
|
-
bind<Func extends (...args: any[]) => any>(
|
|
288
|
-
fn: Func
|
|
289
|
-
): Func;
|
|
283
|
+
bind<Func extends (...args: any[]) => any>(fn: Func): Func;
|
|
290
284
|
/**
|
|
291
285
|
* Call the provided function with the provided arguments in the execution context
|
|
292
286
|
* of the async resource. This will establish the context, trigger the AsyncHooks
|
|
@@ -372,9 +366,7 @@ declare module 'async_hooks' {
|
|
|
372
366
|
* @param fn The function to bind to the current execution context.
|
|
373
367
|
* @return A new function that calls `fn` within the captured execution context.
|
|
374
368
|
*/
|
|
375
|
-
static bind<Func extends (...args: any[]) => any>(
|
|
376
|
-
fn: Func
|
|
377
|
-
): Func;
|
|
369
|
+
static bind<Func extends (...args: any[]) => any>(fn: Func): Func;
|
|
378
370
|
/**
|
|
379
371
|
* Captures the current execution context and returns a function that accepts a
|
|
380
372
|
* function as an argument. Whenever the returned function is called, it
|
|
@@ -96,7 +96,7 @@ declare module 'crypto' {
|
|
|
96
96
|
verifySpkac(spkac: NodeJS.ArrayBufferView): boolean;
|
|
97
97
|
}
|
|
98
98
|
namespace constants {
|
|
99
|
-
// https://nodejs.org/dist/latest-
|
|
99
|
+
// https://nodejs.org/dist/latest-v20.x/docs/api/crypto.html#crypto-constants
|
|
100
100
|
const OPENSSL_VERSION_NUMBER: number;
|
|
101
101
|
/** Applies multiple bug workarounds within OpenSSL. See https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_options.html for detail. */
|
|
102
102
|
const SSL_OP_ALL: number;
|
|
@@ -344,6 +344,49 @@ declare module 'dns/promises' {
|
|
|
344
344
|
* @param order must be `'ipv4first'` or `'verbatim'`.
|
|
345
345
|
*/
|
|
346
346
|
function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
|
|
347
|
+
/**
|
|
348
|
+
* An independent resolver for DNS requests.
|
|
349
|
+
*
|
|
350
|
+
* Creating a new resolver uses the default server settings. Setting
|
|
351
|
+
* the servers used for a resolver using `resolver.setServers()` does not affect
|
|
352
|
+
* other resolvers:
|
|
353
|
+
*
|
|
354
|
+
* ```js
|
|
355
|
+
* const { Resolver } = require('node:dns').promises;
|
|
356
|
+
* const resolver = new Resolver();
|
|
357
|
+
* resolver.setServers(['4.4.4.4']);
|
|
358
|
+
*
|
|
359
|
+
* // This request will use the server at 4.4.4.4, independent of global settings.
|
|
360
|
+
* resolver.resolve4('example.org').then((addresses) => {
|
|
361
|
+
* // ...
|
|
362
|
+
* });
|
|
363
|
+
*
|
|
364
|
+
* // Alternatively, the same code can be written using async-await style.
|
|
365
|
+
* (async function() {
|
|
366
|
+
* const addresses = await resolver.resolve4('example.org');
|
|
367
|
+
* })();
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
* The following methods from the `dnsPromises` API are available:
|
|
371
|
+
*
|
|
372
|
+
* * `resolver.getServers()`
|
|
373
|
+
* * `resolver.resolve()`
|
|
374
|
+
* * `resolver.resolve4()`
|
|
375
|
+
* * `resolver.resolve6()`
|
|
376
|
+
* * `resolver.resolveAny()`
|
|
377
|
+
* * `resolver.resolveCaa()`
|
|
378
|
+
* * `resolver.resolveCname()`
|
|
379
|
+
* * `resolver.resolveMx()`
|
|
380
|
+
* * `resolver.resolveNaptr()`
|
|
381
|
+
* * `resolver.resolveNs()`
|
|
382
|
+
* * `resolver.resolvePtr()`
|
|
383
|
+
* * `resolver.resolveSoa()`
|
|
384
|
+
* * `resolver.resolveSrv()`
|
|
385
|
+
* * `resolver.resolveTxt()`
|
|
386
|
+
* * `resolver.reverse()`
|
|
387
|
+
* * `resolver.setServers()`
|
|
388
|
+
* @since v10.6.0
|
|
389
|
+
*/
|
|
347
390
|
class Resolver {
|
|
348
391
|
constructor(options?: ResolverOptions);
|
|
349
392
|
cancel(): void;
|
|
@@ -352,6 +395,7 @@ declare module 'dns/promises' {
|
|
|
352
395
|
resolve4: typeof resolve4;
|
|
353
396
|
resolve6: typeof resolve6;
|
|
354
397
|
resolveAny: typeof resolveAny;
|
|
398
|
+
resolveCaa: typeof resolveCaa;
|
|
355
399
|
resolveCname: typeof resolveCname;
|
|
356
400
|
resolveMx: typeof resolveMx;
|
|
357
401
|
resolveNaptr: typeof resolveNaptr;
|
|
@@ -633,6 +633,7 @@ declare module 'dns' {
|
|
|
633
633
|
resolve4: typeof resolve4;
|
|
634
634
|
resolve6: typeof resolve6;
|
|
635
635
|
resolveAny: typeof resolveAny;
|
|
636
|
+
resolveCaa: typeof resolveCaa;
|
|
636
637
|
resolveCname: typeof resolveCname;
|
|
637
638
|
resolveMx: typeof resolveMx;
|
|
638
639
|
resolveNaptr: typeof resolveNaptr;
|
|
@@ -310,21 +310,63 @@ declare module 'events' {
|
|
|
310
310
|
*/
|
|
311
311
|
static setMaxListeners(n?: number, ...eventTargets: Array<_DOMEventTarget | NodeJS.EventEmitter>): void;
|
|
312
312
|
/**
|
|
313
|
-
* This symbol shall be used to install a listener for only monitoring `'error'`
|
|
314
|
-
* events. Listeners installed using this symbol are called before the regular
|
|
315
|
-
* `'error'` listeners are called.
|
|
313
|
+
* This symbol shall be used to install a listener for only monitoring `'error'`events. Listeners installed using this symbol are called before the regular`'error'` listeners are called.
|
|
316
314
|
*
|
|
317
|
-
* Installing a listener using this symbol does not change the behavior once an
|
|
318
|
-
* `'error'` event is emitted, therefore the process will still crash if no
|
|
315
|
+
* Installing a listener using this symbol does not change the behavior once an`'error'` event is emitted. Therefore, the process will still crash if no
|
|
319
316
|
* regular `'error'` listener is installed.
|
|
317
|
+
* @since v13.6.0, v12.17.0
|
|
320
318
|
*/
|
|
321
319
|
static readonly errorMonitor: unique symbol;
|
|
320
|
+
/**
|
|
321
|
+
* Value: `Symbol.for('nodejs.rejection')`
|
|
322
|
+
*
|
|
323
|
+
* See how to write a custom `rejection handler`.
|
|
324
|
+
* @since v13.4.0, v12.16.0
|
|
325
|
+
*/
|
|
322
326
|
static readonly captureRejectionSymbol: unique symbol;
|
|
323
327
|
/**
|
|
324
|
-
*
|
|
328
|
+
* Value: [boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type)
|
|
329
|
+
*
|
|
330
|
+
* Change the default `captureRejections` option on all new `EventEmitter` objects.
|
|
331
|
+
* @since v13.4.0, v12.16.0
|
|
325
332
|
*/
|
|
326
|
-
// TODO: These should be described using static getter/setter pairs:
|
|
327
333
|
static captureRejections: boolean;
|
|
334
|
+
/**
|
|
335
|
+
* By default, a maximum of `10` listeners can be registered for any single
|
|
336
|
+
* event. This limit can be changed for individual `EventEmitter` instances
|
|
337
|
+
* using the `emitter.setMaxListeners(n)` method. To change the default
|
|
338
|
+
* for _all_`EventEmitter` instances, the `events.defaultMaxListeners`property can be used. If this value is not a positive number, a `RangeError`is thrown.
|
|
339
|
+
*
|
|
340
|
+
* Take caution when setting the `events.defaultMaxListeners` because the
|
|
341
|
+
* change affects _all_`EventEmitter` instances, including those created before
|
|
342
|
+
* the change is made. However, calling `emitter.setMaxListeners(n)` still has
|
|
343
|
+
* precedence over `events.defaultMaxListeners`.
|
|
344
|
+
*
|
|
345
|
+
* This is not a hard limit. The `EventEmitter` instance will allow
|
|
346
|
+
* more listeners to be added but will output a trace warning to stderr indicating
|
|
347
|
+
* that a "possible EventEmitter memory leak" has been detected. For any single`EventEmitter`, the `emitter.getMaxListeners()` and `emitter.setMaxListeners()`methods can be used to
|
|
348
|
+
* temporarily avoid this warning:
|
|
349
|
+
*
|
|
350
|
+
* ```js
|
|
351
|
+
* import { EventEmitter } from 'node:events';
|
|
352
|
+
* const emitter = new EventEmitter();
|
|
353
|
+
* emitter.setMaxListeners(emitter.getMaxListeners() + 1);
|
|
354
|
+
* emitter.once('event', () => {
|
|
355
|
+
* // do stuff
|
|
356
|
+
* emitter.setMaxListeners(Math.max(emitter.getMaxListeners() - 1, 0));
|
|
357
|
+
* });
|
|
358
|
+
* ```
|
|
359
|
+
*
|
|
360
|
+
* The `--trace-warnings` command-line flag can be used to display the
|
|
361
|
+
* stack trace for such warnings.
|
|
362
|
+
*
|
|
363
|
+
* The emitted warning can be inspected with `process.on('warning')` and will
|
|
364
|
+
* have the additional `emitter`, `type`, and `count` properties, referring to
|
|
365
|
+
* the event emitter instance, the event's name and the number of attached
|
|
366
|
+
* listeners, respectively.
|
|
367
|
+
* Its `name` property is set to `'MaxListenersExceededWarning'`.
|
|
368
|
+
* @since v0.11.2
|
|
369
|
+
*/
|
|
328
370
|
static defaultMaxListeners: number;
|
|
329
371
|
}
|
|
330
372
|
import internal = require('node:events');
|
|
@@ -149,12 +149,38 @@ declare module 'fs' {
|
|
|
149
149
|
}
|
|
150
150
|
export interface StatsFs extends StatsFsBase<number> {}
|
|
151
151
|
/**
|
|
152
|
-
* Provides information about a mounted file system
|
|
152
|
+
* Provides information about a mounted file system.
|
|
153
153
|
*
|
|
154
|
-
* Objects returned from {@link statfs} and
|
|
155
|
-
* If `bigint` in the `options` passed to those methods is true
|
|
156
|
-
* will be `bigint` instead of `number`.
|
|
157
|
-
*
|
|
154
|
+
* Objects returned from {@link statfs} and its synchronous counterpart are of
|
|
155
|
+
* this type. If `bigint` in the `options` passed to those methods is `true`, the
|
|
156
|
+
* numeric values will be `bigint` instead of `number`.
|
|
157
|
+
*
|
|
158
|
+
* ```console
|
|
159
|
+
* StatFs {
|
|
160
|
+
* type: 1397114950,
|
|
161
|
+
* bsize: 4096,
|
|
162
|
+
* blocks: 121938943,
|
|
163
|
+
* bfree: 61058895,
|
|
164
|
+
* bavail: 61058895,
|
|
165
|
+
* files: 999,
|
|
166
|
+
* ffree: 1000000
|
|
167
|
+
* }
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
* `bigint` version:
|
|
171
|
+
*
|
|
172
|
+
* ```console
|
|
173
|
+
* StatFs {
|
|
174
|
+
* type: 1397114950n,
|
|
175
|
+
* bsize: 4096n,
|
|
176
|
+
* blocks: 121938943n,
|
|
177
|
+
* bfree: 61058895n,
|
|
178
|
+
* bavail: 61058895n,
|
|
179
|
+
* files: 999n,
|
|
180
|
+
* ffree: 1000000n
|
|
181
|
+
* }
|
|
182
|
+
* ```
|
|
183
|
+
* @since v19.6.0, v18.15.0
|
|
158
184
|
*/
|
|
159
185
|
export class StatsFs {}
|
|
160
186
|
export interface BigIntStatsFs extends StatsFsBase<bigint> {}
|
|
@@ -214,6 +240,11 @@ declare module 'fs' {
|
|
|
214
240
|
* @since v10.10.0
|
|
215
241
|
*/
|
|
216
242
|
name: string;
|
|
243
|
+
/**
|
|
244
|
+
* The base path that this `fs.Dirent` object refers to.
|
|
245
|
+
* @since v20.1.0
|
|
246
|
+
*/
|
|
247
|
+
path: string;
|
|
217
248
|
}
|
|
218
249
|
/**
|
|
219
250
|
* A class representing a directory stream.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.1.
|
|
3
|
+
"version": "20.1.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -232,6 +232,6 @@
|
|
|
232
232
|
},
|
|
233
233
|
"scripts": {},
|
|
234
234
|
"dependencies": {},
|
|
235
|
-
"typesPublisherContentHash": "
|
|
235
|
+
"typesPublisherContentHash": "a821357c6e565ca2470c2b7f613961727e971d28c26c1160834a50312f336893",
|
|
236
236
|
"typeScriptVersion": "4.3"
|
|
237
237
|
}
|