@types/node 18.17.17 → 18.17.19
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 v18.17/README.md +1 -1
- node v18.17/assert/strict.d.ts +4 -4
- node v18.17/assert.d.ts +48 -24
- node v18.17/async_hooks.d.ts +10 -7
- node v18.17/buffer.d.ts +32 -34
- node v18.17/child_process.d.ts +262 -122
- node v18.17/cluster.d.ts +107 -89
- node v18.17/console.d.ts +7 -7
- node v18.17/constants.d.ts +12 -11
- node v18.17/crypto.d.ts +746 -268
- node v18.17/dgram.d.ts +81 -45
- node v18.17/diagnostics_channel.d.ts +3 -3
- node v18.17/dns/promises.d.ts +28 -25
- node v18.17/dns.d.ts +203 -62
- node v18.17/dom-events.d.ts +67 -71
- node v18.17/domain.d.ts +4 -4
- node v18.17/events.d.ts +15 -7
- node v18.17/fs/promises.d.ts +102 -73
- node v18.17/fs.d.ts +513 -311
- node v18.17/globals.d.ts +16 -18
- node v18.17/http.d.ts +185 -185
- node v18.17/http2.d.ts +628 -376
- node v18.17/https.d.ts +107 -105
- node v18.17/inspector.d.ts +3 -3
- node v18.17/module.d.ts +11 -8
- node v18.17/net.d.ts +112 -93
- node v18.17/os.d.ts +7 -7
- node v18.17/package.json +2 -2
- node v18.17/path.d.ts +13 -13
- node v18.17/perf_hooks.d.ts +20 -19
- node v18.17/process.d.ts +155 -125
- node v18.17/punycode.d.ts +3 -3
- node v18.17/querystring.d.ts +14 -4
- node v18.17/readline/promises.d.ts +5 -5
- node v18.17/readline.d.ts +69 -56
- node v18.17/repl.d.ts +67 -61
- node v18.17/stream/consumers.d.ts +4 -4
- node v18.17/stream/promises.d.ts +56 -15
- node v18.17/stream/web.d.ts +26 -20
- node v18.17/stream.d.ts +356 -226
- node v18.17/string_decoder.d.ts +3 -3
- node v18.17/test.d.ts +76 -91
- node v18.17/timers/promises.d.ts +4 -4
- node v18.17/timers.d.ts +23 -8
- node v18.17/tls.d.ts +151 -71
- node v18.17/trace_events.d.ts +3 -3
- node v18.17/ts4.8/assert/strict.d.ts +4 -4
- node v18.17/ts4.8/assert.d.ts +48 -24
- node v18.17/ts4.8/async_hooks.d.ts +10 -7
- node v18.17/ts4.8/buffer.d.ts +32 -34
- node v18.17/ts4.8/child_process.d.ts +262 -122
- node v18.17/ts4.8/cluster.d.ts +107 -89
- node v18.17/ts4.8/console.d.ts +7 -7
- node v18.17/ts4.8/constants.d.ts +12 -11
- node v18.17/ts4.8/crypto.d.ts +746 -268
- node v18.17/ts4.8/dgram.d.ts +81 -45
- node v18.17/ts4.8/diagnostics_channel.d.ts +3 -3
- node v18.17/ts4.8/dns/promises.d.ts +28 -25
- node v18.17/ts4.8/dns.d.ts +203 -62
- node v18.17/ts4.8/dom-events.d.ts +67 -71
- node v18.17/ts4.8/domain.d.ts +4 -4
- node v18.17/ts4.8/events.d.ts +15 -7
- node v18.17/ts4.8/fs/promises.d.ts +102 -73
- node v18.17/ts4.8/fs.d.ts +514 -312
- node v18.17/ts4.8/globals.d.ts +44 -46
- node v18.17/ts4.8/http.d.ts +185 -185
- node v18.17/ts4.8/http2.d.ts +628 -376
- node v18.17/ts4.8/https.d.ts +107 -105
- node v18.17/ts4.8/inspector.d.ts +3 -3
- node v18.17/ts4.8/module.d.ts +11 -8
- node v18.17/ts4.8/net.d.ts +112 -93
- node v18.17/ts4.8/os.d.ts +7 -7
- node v18.17/ts4.8/path.d.ts +13 -13
- node v18.17/ts4.8/perf_hooks.d.ts +20 -19
- node v18.17/ts4.8/process.d.ts +155 -125
- node v18.17/ts4.8/punycode.d.ts +3 -3
- node v18.17/ts4.8/querystring.d.ts +14 -4
- node v18.17/ts4.8/readline/promises.d.ts +5 -5
- node v18.17/ts4.8/readline.d.ts +69 -56
- node v18.17/ts4.8/repl.d.ts +67 -61
- node v18.17/ts4.8/stream/consumers.d.ts +4 -4
- node v18.17/ts4.8/stream/promises.d.ts +56 -15
- node v18.17/ts4.8/stream/web.d.ts +26 -20
- node v18.17/ts4.8/stream.d.ts +321 -217
- node v18.17/ts4.8/string_decoder.d.ts +3 -3
- node v18.17/ts4.8/test.d.ts +75 -90
- node v18.17/ts4.8/timers/promises.d.ts +4 -4
- node v18.17/ts4.8/timers.d.ts +23 -8
- node v18.17/ts4.8/tls.d.ts +151 -71
- node v18.17/ts4.8/trace_events.d.ts +3 -3
- node v18.17/ts4.8/tty.d.ts +10 -10
- node v18.17/ts4.8/url.d.ts +26 -14
- node v18.17/ts4.8/util.d.ts +178 -117
- node v18.17/ts4.8/v8.d.ts +4 -4
- node v18.17/ts4.8/vm.d.ts +60 -42
- node v18.17/ts4.8/wasi.d.ts +3 -3
- node v18.17/ts4.8/worker_threads.d.ts +82 -85
- node v18.17/ts4.8/zlib.d.ts +9 -9
- node v18.17/tty.d.ts +10 -10
- node v18.17/url.d.ts +26 -14
- node v18.17/util.d.ts +178 -117
- node v18.17/v8.d.ts +4 -4
- node v18.17/vm.d.ts +60 -42
- node v18.17/wasi.d.ts +3 -3
- node v18.17/worker_threads.d.ts +82 -85
- node v18.17/zlib.d.ts +9 -9
node v18.17/ts4.8/buffer.d.ts
CHANGED
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
* ```
|
|
44
44
|
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/buffer.js)
|
|
45
45
|
*/
|
|
46
|
-
declare module
|
|
47
|
-
import { BinaryLike } from
|
|
48
|
-
import { ReadableStream as WebReadableStream } from
|
|
46
|
+
declare module "buffer" {
|
|
47
|
+
import { BinaryLike } from "node:crypto";
|
|
48
|
+
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
|
49
49
|
export function isUtf8(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
50
50
|
export function isAscii(input: Buffer | ArrayBuffer | NodeJS.TypedArray): boolean;
|
|
51
51
|
export const INSPECT_MAX_BYTES: number;
|
|
@@ -55,7 +55,7 @@ declare module 'node:buffer' {
|
|
|
55
55
|
MAX_LENGTH: number;
|
|
56
56
|
MAX_STRING_LENGTH: number;
|
|
57
57
|
};
|
|
58
|
-
export type TranscodeEncoding =
|
|
58
|
+
export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
|
|
59
59
|
/**
|
|
60
60
|
* Re-encodes the given `Buffer` or `Uint8Array` instance from one character
|
|
61
61
|
* encoding to another. Returns a new `Buffer` instance.
|
|
@@ -86,7 +86,7 @@ declare module 'node:buffer' {
|
|
|
86
86
|
export function transcode(source: Uint8Array, fromEnc: TranscodeEncoding, toEnc: TranscodeEncoding): Buffer;
|
|
87
87
|
export const SlowBuffer: {
|
|
88
88
|
/** @deprecated since v6.0.0, use `Buffer.allocUnsafeSlow()` */
|
|
89
|
-
new
|
|
89
|
+
new(size: number): Buffer;
|
|
90
90
|
prototype: Buffer;
|
|
91
91
|
};
|
|
92
92
|
/**
|
|
@@ -170,7 +170,7 @@ declare module 'node:buffer' {
|
|
|
170
170
|
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts will be
|
|
171
171
|
* converted to the platform native line-ending as specified by `require('node:os').EOL`.
|
|
172
172
|
*/
|
|
173
|
-
endings?:
|
|
173
|
+
endings?: "native" | "transparent";
|
|
174
174
|
/** The File content-type. */
|
|
175
175
|
type?: string;
|
|
176
176
|
/** The last modified date of the file. `Default`: Date.now(). */
|
|
@@ -197,7 +197,7 @@ declare module 'node:buffer' {
|
|
|
197
197
|
export import atob = globalThis.atob;
|
|
198
198
|
export import btoa = globalThis.btoa;
|
|
199
199
|
|
|
200
|
-
import { Blob as NodeBlob } from
|
|
200
|
+
import { Blob as NodeBlob } from "buffer";
|
|
201
201
|
// This conditional type will be the existing global Blob in a browser, or
|
|
202
202
|
// the copy below in a Node environment.
|
|
203
203
|
type __Blob = typeof globalThis extends { onmessage: any; Blob: infer T } ? T : NodeBlob;
|
|
@@ -207,22 +207,22 @@ declare module 'node:buffer' {
|
|
|
207
207
|
}
|
|
208
208
|
// Buffer class
|
|
209
209
|
type BufferEncoding =
|
|
210
|
-
|
|
|
211
|
-
|
|
|
212
|
-
|
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
|
217
|
-
|
|
|
218
|
-
|
|
|
219
|
-
|
|
|
220
|
-
|
|
|
210
|
+
| "ascii"
|
|
211
|
+
| "utf8"
|
|
212
|
+
| "utf-8"
|
|
213
|
+
| "utf16le"
|
|
214
|
+
| "ucs2"
|
|
215
|
+
| "ucs-2"
|
|
216
|
+
| "base64"
|
|
217
|
+
| "base64url"
|
|
218
|
+
| "latin1"
|
|
219
|
+
| "binary"
|
|
220
|
+
| "hex";
|
|
221
221
|
type WithImplicitCoercion<T> =
|
|
222
222
|
| T
|
|
223
223
|
| {
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
valueOf(): T;
|
|
225
|
+
};
|
|
226
226
|
/**
|
|
227
227
|
* Raw data is stored in instances of the Buffer class.
|
|
228
228
|
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
@@ -236,44 +236,43 @@ declare module 'node:buffer' {
|
|
|
236
236
|
* @param encoding encoding to use, optional. Default is 'utf8'
|
|
237
237
|
* @deprecated since v10.0.0 - Use `Buffer.from(string[, encoding])` instead.
|
|
238
238
|
*/
|
|
239
|
-
new
|
|
239
|
+
new(str: string, encoding?: BufferEncoding): Buffer;
|
|
240
240
|
/**
|
|
241
241
|
* Allocates a new buffer of {size} octets.
|
|
242
242
|
*
|
|
243
243
|
* @param size count of octets to allocate.
|
|
244
244
|
* @deprecated since v10.0.0 - Use `Buffer.alloc()` instead (also see `Buffer.allocUnsafe()`).
|
|
245
245
|
*/
|
|
246
|
-
new
|
|
246
|
+
new(size: number): Buffer;
|
|
247
247
|
/**
|
|
248
248
|
* Allocates a new buffer containing the given {array} of octets.
|
|
249
249
|
*
|
|
250
250
|
* @param array The octets to store.
|
|
251
251
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
252
252
|
*/
|
|
253
|
-
new
|
|
253
|
+
new(array: Uint8Array): Buffer;
|
|
254
254
|
/**
|
|
255
255
|
* Produces a Buffer backed by the same allocated memory as
|
|
256
256
|
* the given {ArrayBuffer}/{SharedArrayBuffer}.
|
|
257
257
|
*
|
|
258
|
-
*
|
|
259
258
|
* @param arrayBuffer The ArrayBuffer with which to share memory.
|
|
260
259
|
* @deprecated since v10.0.0 - Use `Buffer.from(arrayBuffer[, byteOffset[, length]])` instead.
|
|
261
260
|
*/
|
|
262
|
-
new
|
|
261
|
+
new(arrayBuffer: ArrayBuffer | SharedArrayBuffer): Buffer;
|
|
263
262
|
/**
|
|
264
263
|
* Allocates a new buffer containing the given {array} of octets.
|
|
265
264
|
*
|
|
266
265
|
* @param array The octets to store.
|
|
267
266
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
268
267
|
*/
|
|
269
|
-
new
|
|
268
|
+
new(array: ReadonlyArray<any>): Buffer;
|
|
270
269
|
/**
|
|
271
270
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
272
271
|
*
|
|
273
272
|
* @param buffer The buffer to copy.
|
|
274
273
|
* @deprecated since v10.0.0 - Use `Buffer.from(buffer)` instead.
|
|
275
274
|
*/
|
|
276
|
-
new
|
|
275
|
+
new(buffer: Buffer): Buffer;
|
|
277
276
|
/**
|
|
278
277
|
* Allocates a new `Buffer` using an `array` of bytes in the range `0` – `255`.
|
|
279
278
|
* Array entries outside that range will be truncated to fit into it.
|
|
@@ -311,8 +310,8 @@ declare module 'node:buffer' {
|
|
|
311
310
|
str:
|
|
312
311
|
| WithImplicitCoercion<string>
|
|
313
312
|
| {
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
[Symbol.toPrimitive](hint: "string"): string;
|
|
314
|
+
},
|
|
316
315
|
encoding?: BufferEncoding,
|
|
317
316
|
): Buffer;
|
|
318
317
|
/**
|
|
@@ -693,7 +692,7 @@ declare module 'node:buffer' {
|
|
|
693
692
|
* @since v0.9.2
|
|
694
693
|
*/
|
|
695
694
|
toJSON(): {
|
|
696
|
-
type:
|
|
695
|
+
type: "Buffer";
|
|
697
696
|
data: number[];
|
|
698
697
|
};
|
|
699
698
|
/**
|
|
@@ -2313,11 +2312,10 @@ declare module 'node:buffer' {
|
|
|
2313
2312
|
var Blob: typeof globalThis extends {
|
|
2314
2313
|
onmessage: any;
|
|
2315
2314
|
Blob: infer T;
|
|
2316
|
-
}
|
|
2317
|
-
? T
|
|
2315
|
+
} ? T
|
|
2318
2316
|
: typeof NodeBlob;
|
|
2319
2317
|
}
|
|
2320
2318
|
}
|
|
2321
|
-
declare module
|
|
2322
|
-
export * from
|
|
2319
|
+
declare module "node:buffer" {
|
|
2320
|
+
export * from "buffer";
|
|
2323
2321
|
}
|