@types/node 14.18.61 → 14.18.63
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 v14.18/README.md +1 -1
- node v14.18/assert.d.ts +33 -31
- node v14.18/async_hooks.d.ts +27 -20
- node v14.18/buffer.d.ts +4 -4
- node v14.18/child_process.d.ts +191 -62
- node v14.18/cluster.d.ts +59 -28
- node v14.18/console.d.ts +6 -6
- node v14.18/constants.d.ts +12 -11
- node v14.18/crypto.d.ts +232 -228
- node v14.18/dgram.d.ts +50 -14
- node v14.18/dns.d.ts +183 -54
- node v14.18/domain.d.ts +4 -4
- node v14.18/events.d.ts +4 -4
- node v14.18/fs/promises.d.ts +87 -25
- node v14.18/fs.d.ts +404 -104
- node v14.18/globals.d.ts +33 -16
- node v14.18/http.d.ts +201 -201
- node v14.18/http2.d.ts +340 -93
- node v14.18/https.d.ts +107 -105
- node v14.18/inspector.d.ts +4 -4
- node v14.18/module.d.ts +4 -4
- node v14.18/net.d.ts +27 -12
- node v14.18/os.d.ts +4 -4
- node v14.18/package.json +2 -2
- node v14.18/path.d.ts +5 -5
- node v14.18/perf_hooks.d.ts +5 -5
- node v14.18/process.d.ts +61 -22
- node v14.18/punycode.d.ts +3 -3
- node v14.18/querystring.d.ts +15 -5
- node v14.18/readline.d.ts +16 -6
- node v14.18/repl.d.ts +13 -7
- node v14.18/stream.d.ts +160 -100
- node v14.18/string_decoder.d.ts +3 -3
- node v14.18/timers.d.ts +3 -3
- node v14.18/tls.d.ts +109 -27
- node v14.18/trace_events.d.ts +3 -3
- node v14.18/ts4.8/assert.d.ts +33 -31
- node v14.18/ts4.8/async_hooks.d.ts +27 -20
- node v14.18/ts4.8/buffer.d.ts +4 -4
- node v14.18/ts4.8/child_process.d.ts +191 -62
- node v14.18/ts4.8/cluster.d.ts +59 -28
- node v14.18/ts4.8/console.d.ts +6 -6
- node v14.18/ts4.8/constants.d.ts +12 -11
- node v14.18/ts4.8/crypto.d.ts +232 -228
- node v14.18/ts4.8/dgram.d.ts +50 -14
- node v14.18/ts4.8/dns.d.ts +183 -54
- node v14.18/ts4.8/domain.d.ts +4 -4
- node v14.18/ts4.8/events.d.ts +4 -4
- node v14.18/ts4.8/fs/promises.d.ts +87 -25
- node v14.18/ts4.8/fs.d.ts +404 -104
- node v14.18/ts4.8/globals.d.ts +33 -16
- node v14.18/ts4.8/http.d.ts +200 -200
- node v14.18/ts4.8/http2.d.ts +340 -93
- node v14.18/ts4.8/https.d.ts +107 -105
- node v14.18/ts4.8/inspector.d.ts +4 -4
- node v14.18/ts4.8/module.d.ts +4 -4
- node v14.18/ts4.8/net.d.ts +27 -12
- node v14.18/ts4.8/os.d.ts +4 -4
- node v14.18/ts4.8/path.d.ts +5 -5
- node v14.18/ts4.8/perf_hooks.d.ts +5 -5
- node v14.18/ts4.8/process.d.ts +61 -22
- node v14.18/ts4.8/punycode.d.ts +3 -3
- node v14.18/ts4.8/querystring.d.ts +15 -5
- node v14.18/ts4.8/readline.d.ts +16 -6
- node v14.18/ts4.8/repl.d.ts +13 -7
- node v14.18/ts4.8/stream.d.ts +160 -100
- node v14.18/ts4.8/string_decoder.d.ts +3 -3
- node v14.18/ts4.8/timers.d.ts +3 -3
- node v14.18/ts4.8/tls.d.ts +109 -27
- node v14.18/ts4.8/trace_events.d.ts +3 -3
- node v14.18/ts4.8/tty.d.ts +4 -4
- node v14.18/ts4.8/url.d.ts +21 -12
- node v14.18/ts4.8/util.d.ts +102 -40
- node v14.18/ts4.8/v8.d.ts +4 -5
- node v14.18/ts4.8/vm.d.ts +7 -7
- node v14.18/ts4.8/wasi.d.ts +3 -4
- node v14.18/ts4.8/worker_threads.d.ts +8 -8
- node v14.18/ts4.8/zlib.d.ts +13 -13
- node v14.18/tty.d.ts +4 -4
- node v14.18/url.d.ts +21 -12
- node v14.18/util.d.ts +102 -40
- node v14.18/v8.d.ts +4 -5
- node v14.18/vm.d.ts +7 -7
- node v14.18/wasi.d.ts +3 -4
- node v14.18/worker_threads.d.ts +8 -8
- node v14.18/zlib.d.ts +13 -13
node v14.18/globals.d.ts
CHANGED
|
@@ -71,11 +71,22 @@ declare var module: NodeModule;
|
|
|
71
71
|
declare var exports: any;
|
|
72
72
|
|
|
73
73
|
// Buffer class
|
|
74
|
-
type BufferEncoding =
|
|
74
|
+
type BufferEncoding =
|
|
75
|
+
| "ascii"
|
|
76
|
+
| "utf8"
|
|
77
|
+
| "utf-8"
|
|
78
|
+
| "utf16le"
|
|
79
|
+
| "ucs2"
|
|
80
|
+
| "ucs-2"
|
|
81
|
+
| "base64"
|
|
82
|
+
| "base64url"
|
|
83
|
+
| "latin1"
|
|
84
|
+
| "binary"
|
|
85
|
+
| "hex";
|
|
75
86
|
|
|
76
87
|
type WithImplicitCoercion<T> = T | { valueOf(): T };
|
|
77
88
|
|
|
78
|
-
|
|
89
|
+
// #region borrowed
|
|
79
90
|
// from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
|
|
80
91
|
/**
|
|
81
92
|
* A controller object that allows you to abort one or more DOM requests as and when desired.
|
|
@@ -118,7 +129,7 @@ declare var AbortSignal: {
|
|
|
118
129
|
abort(reason?: any): AbortSignal;
|
|
119
130
|
timeout(milliseconds: number): AbortSignal;
|
|
120
131
|
};
|
|
121
|
-
|
|
132
|
+
// #endregion borrowed
|
|
122
133
|
|
|
123
134
|
/**
|
|
124
135
|
* Raw data is stored in instances of the Buffer class.
|
|
@@ -152,7 +163,6 @@ declare class Buffer extends Uint8Array {
|
|
|
152
163
|
* Produces a Buffer backed by the same allocated memory as
|
|
153
164
|
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
154
165
|
*
|
|
155
|
-
*
|
|
156
166
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
157
167
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
158
168
|
*/
|
|
@@ -179,7 +189,11 @@ declare class Buffer extends Uint8Array {
|
|
|
179
189
|
*
|
|
180
190
|
* @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
|
|
181
191
|
*/
|
|
182
|
-
static from(
|
|
192
|
+
static from(
|
|
193
|
+
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
|
194
|
+
byteOffset?: number,
|
|
195
|
+
length?: number,
|
|
196
|
+
): Buffer;
|
|
183
197
|
/**
|
|
184
198
|
* Creates a new Buffer using the passed {data}
|
|
185
199
|
* @param data data to create a new Buffer
|
|
@@ -191,7 +205,10 @@ declare class Buffer extends Uint8Array {
|
|
|
191
205
|
* If provided, the {encoding} parameter identifies the character encoding.
|
|
192
206
|
* If not provided, {encoding} defaults to 'utf8'.
|
|
193
207
|
*/
|
|
194
|
-
static from(
|
|
208
|
+
static from(
|
|
209
|
+
str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string },
|
|
210
|
+
encoding?: BufferEncoding,
|
|
211
|
+
): Buffer;
|
|
195
212
|
/**
|
|
196
213
|
* Creates a new Buffer using the passed {data}
|
|
197
214
|
* @param values to create a new Buffer
|
|
@@ -219,7 +236,7 @@ declare class Buffer extends Uint8Array {
|
|
|
219
236
|
*/
|
|
220
237
|
static byteLength(
|
|
221
238
|
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
222
|
-
encoding?: BufferEncoding
|
|
239
|
+
encoding?: BufferEncoding,
|
|
223
240
|
): number;
|
|
224
241
|
/**
|
|
225
242
|
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
@@ -269,14 +286,14 @@ declare class Buffer extends Uint8Array {
|
|
|
269
286
|
write(string: string, offset: number, encoding?: BufferEncoding): number;
|
|
270
287
|
write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
|
|
271
288
|
toString(encoding?: BufferEncoding, start?: number, end?: number): string;
|
|
272
|
-
toJSON(): { type:
|
|
289
|
+
toJSON(): { type: "Buffer"; data: number[] };
|
|
273
290
|
equals(otherBuffer: Uint8Array): boolean;
|
|
274
291
|
compare(
|
|
275
292
|
otherBuffer: Uint8Array,
|
|
276
293
|
targetStart?: number,
|
|
277
294
|
targetEnd?: number,
|
|
278
295
|
sourceStart?: number,
|
|
279
|
-
sourceEnd?: number
|
|
296
|
+
sourceEnd?: number,
|
|
280
297
|
): number;
|
|
281
298
|
copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
282
299
|
/**
|
|
@@ -461,7 +478,7 @@ declare namespace NodeJS {
|
|
|
461
478
|
* the getter function.
|
|
462
479
|
* @default `false`
|
|
463
480
|
*/
|
|
464
|
-
getters?:
|
|
481
|
+
getters?: "get" | "set" | boolean | undefined;
|
|
465
482
|
showHidden?: boolean | undefined;
|
|
466
483
|
/**
|
|
467
484
|
* @default 2
|
|
@@ -581,7 +598,7 @@ declare namespace NodeJS {
|
|
|
581
598
|
pause(): this;
|
|
582
599
|
resume(): this;
|
|
583
600
|
isPaused(): boolean;
|
|
584
|
-
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined
|
|
601
|
+
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
|
585
602
|
unpipe(destination?: WritableStream): this;
|
|
586
603
|
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
587
604
|
wrap(oldStream: ReadableStream): this;
|
|
@@ -597,7 +614,7 @@ declare namespace NodeJS {
|
|
|
597
614
|
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
598
615
|
}
|
|
599
616
|
|
|
600
|
-
interface ReadWriteStream extends ReadableStream, WritableStream {
|
|
617
|
+
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
|
601
618
|
|
|
602
619
|
interface Global {
|
|
603
620
|
Array: typeof Array;
|
|
@@ -711,14 +728,14 @@ declare namespace NodeJS {
|
|
|
711
728
|
}
|
|
712
729
|
|
|
713
730
|
interface RequireResolve {
|
|
714
|
-
(id: string, options?: { paths?: string[] | undefined
|
|
731
|
+
(id: string, options?: { paths?: string[] | undefined }): string;
|
|
715
732
|
paths(request: string): string[] | null;
|
|
716
733
|
}
|
|
717
734
|
|
|
718
735
|
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
736
|
+
".js": (m: Module, filename: string) => any;
|
|
737
|
+
".json": (m: Module, filename: string) => any;
|
|
738
|
+
".node": (m: Module, filename: string) => any;
|
|
722
739
|
}
|
|
723
740
|
interface Module {
|
|
724
741
|
exports: any;
|