@types/node 14.18.62 → 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/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/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/ts4.8/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.
|
|
@@ -116,7 +127,7 @@ declare var AbortSignal: {
|
|
|
116
127
|
new(): AbortSignal;
|
|
117
128
|
// TODO: Add abort() static
|
|
118
129
|
};
|
|
119
|
-
|
|
130
|
+
// #endregion borrowed
|
|
120
131
|
|
|
121
132
|
/**
|
|
122
133
|
* Raw data is stored in instances of the Buffer class.
|
|
@@ -150,7 +161,6 @@ declare class Buffer extends Uint8Array {
|
|
|
150
161
|
* Produces a Buffer backed by the same allocated memory as
|
|
151
162
|
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
152
163
|
*
|
|
153
|
-
*
|
|
154
164
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
155
165
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
156
166
|
*/
|
|
@@ -177,7 +187,11 @@ declare class Buffer extends Uint8Array {
|
|
|
177
187
|
*
|
|
178
188
|
* @param arrayBuffer The .buffer property of any TypedArray or a new ArrayBuffer()
|
|
179
189
|
*/
|
|
180
|
-
static from(
|
|
190
|
+
static from(
|
|
191
|
+
arrayBuffer: WithImplicitCoercion<ArrayBuffer | SharedArrayBuffer>,
|
|
192
|
+
byteOffset?: number,
|
|
193
|
+
length?: number,
|
|
194
|
+
): Buffer;
|
|
181
195
|
/**
|
|
182
196
|
* Creates a new Buffer using the passed {data}
|
|
183
197
|
* @param data data to create a new Buffer
|
|
@@ -189,7 +203,10 @@ declare class Buffer extends Uint8Array {
|
|
|
189
203
|
* If provided, the {encoding} parameter identifies the character encoding.
|
|
190
204
|
* If not provided, {encoding} defaults to 'utf8'.
|
|
191
205
|
*/
|
|
192
|
-
static from(
|
|
206
|
+
static from(
|
|
207
|
+
str: WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string },
|
|
208
|
+
encoding?: BufferEncoding,
|
|
209
|
+
): Buffer;
|
|
193
210
|
/**
|
|
194
211
|
* Creates a new Buffer using the passed {data}
|
|
195
212
|
* @param values to create a new Buffer
|
|
@@ -217,7 +234,7 @@ declare class Buffer extends Uint8Array {
|
|
|
217
234
|
*/
|
|
218
235
|
static byteLength(
|
|
219
236
|
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
220
|
-
encoding?: BufferEncoding
|
|
237
|
+
encoding?: BufferEncoding,
|
|
221
238
|
): number;
|
|
222
239
|
/**
|
|
223
240
|
* Returns a buffer which is the result of concatenating all the buffers in the list together.
|
|
@@ -267,14 +284,14 @@ declare class Buffer extends Uint8Array {
|
|
|
267
284
|
write(string: string, offset: number, encoding?: BufferEncoding): number;
|
|
268
285
|
write(string: string, offset: number, length: number, encoding?: BufferEncoding): number;
|
|
269
286
|
toString(encoding?: BufferEncoding, start?: number, end?: number): string;
|
|
270
|
-
toJSON(): { type:
|
|
287
|
+
toJSON(): { type: "Buffer"; data: number[] };
|
|
271
288
|
equals(otherBuffer: Uint8Array): boolean;
|
|
272
289
|
compare(
|
|
273
290
|
otherBuffer: Uint8Array,
|
|
274
291
|
targetStart?: number,
|
|
275
292
|
targetEnd?: number,
|
|
276
293
|
sourceStart?: number,
|
|
277
|
-
sourceEnd?: number
|
|
294
|
+
sourceEnd?: number,
|
|
278
295
|
): number;
|
|
279
296
|
copy(targetBuffer: Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
|
|
280
297
|
/**
|
|
@@ -459,7 +476,7 @@ declare namespace NodeJS {
|
|
|
459
476
|
* the getter function.
|
|
460
477
|
* @default `false`
|
|
461
478
|
*/
|
|
462
|
-
getters?:
|
|
479
|
+
getters?: "get" | "set" | boolean | undefined;
|
|
463
480
|
showHidden?: boolean | undefined;
|
|
464
481
|
/**
|
|
465
482
|
* @default 2
|
|
@@ -579,7 +596,7 @@ declare namespace NodeJS {
|
|
|
579
596
|
pause(): this;
|
|
580
597
|
resume(): this;
|
|
581
598
|
isPaused(): boolean;
|
|
582
|
-
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined
|
|
599
|
+
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
|
|
583
600
|
unpipe(destination?: WritableStream): this;
|
|
584
601
|
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
585
602
|
wrap(oldStream: ReadableStream): this;
|
|
@@ -595,7 +612,7 @@ declare namespace NodeJS {
|
|
|
595
612
|
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
596
613
|
}
|
|
597
614
|
|
|
598
|
-
interface ReadWriteStream extends ReadableStream, WritableStream {
|
|
615
|
+
interface ReadWriteStream extends ReadableStream, WritableStream {}
|
|
599
616
|
|
|
600
617
|
interface Global {
|
|
601
618
|
Array: typeof Array;
|
|
@@ -709,14 +726,14 @@ declare namespace NodeJS {
|
|
|
709
726
|
}
|
|
710
727
|
|
|
711
728
|
interface RequireResolve {
|
|
712
|
-
(id: string, options?: { paths?: string[] | undefined
|
|
729
|
+
(id: string, options?: { paths?: string[] | undefined }): string;
|
|
713
730
|
paths(request: string): string[] | null;
|
|
714
731
|
}
|
|
715
732
|
|
|
716
733
|
interface RequireExtensions extends Dict<(m: Module, filename: string) => any> {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
734
|
+
".js": (m: Module, filename: string) => any;
|
|
735
|
+
".json": (m: Module, filename: string) => any;
|
|
736
|
+
".node": (m: Module, filename: string) => any;
|
|
720
737
|
}
|
|
721
738
|
interface Module {
|
|
722
739
|
exports: any;
|