@types/node 16.18.52 → 16.18.54
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 v16.18/README.md +1 -1
- node v16.18/assert/strict.d.ts +4 -4
- node v16.18/assert.d.ts +48 -24
- node v16.18/async_hooks.d.ts +10 -7
- node v16.18/buffer.d.ts +47 -24
- node v16.18/child_process.d.ts +262 -122
- node v16.18/cluster.d.ts +107 -89
- node v16.18/console.d.ts +7 -7
- node v16.18/constants.d.ts +12 -11
- node v16.18/crypto.d.ts +738 -267
- node v16.18/dgram.d.ts +81 -45
- node v16.18/diagnostics_channel.d.ts +3 -3
- node v16.18/dns/promises.d.ts +28 -25
- node v16.18/dns.d.ts +202 -61
- node v16.18/domain.d.ts +4 -4
- node v16.18/events.d.ts +15 -7
- node v16.18/fs/promises.d.ts +93 -64
- node v16.18/fs.d.ts +485 -290
- node v16.18/globals.d.ts +13 -13
- node v16.18/http.d.ts +177 -177
- node v16.18/http2.d.ts +628 -376
- node v16.18/https.d.ts +107 -105
- node v16.18/inspector.d.ts +3 -3
- node v16.18/module.d.ts +11 -8
- node v16.18/net.d.ts +106 -87
- node v16.18/os.d.ts +7 -7
- node v16.18/package.json +2 -2
- node v16.18/path.d.ts +13 -13
- node v16.18/perf_hooks.d.ts +17 -15
- node v16.18/process.d.ts +144 -124
- node v16.18/punycode.d.ts +3 -3
- node v16.18/querystring.d.ts +14 -4
- node v16.18/readline.d.ts +64 -54
- node v16.18/repl.d.ts +67 -61
- node v16.18/stream/consumers.d.ts +4 -4
- node v16.18/stream/promises.d.ts +56 -15
- node v16.18/stream/web.d.ts +19 -19
- node v16.18/stream.d.ts +314 -216
- node v16.18/string_decoder.d.ts +3 -3
- node v16.18/test.d.ts +2 -2
- node v16.18/timers/promises.d.ts +4 -4
- node v16.18/timers.d.ts +23 -8
- node v16.18/tls.d.ts +150 -71
- node v16.18/trace_events.d.ts +3 -3
- node v16.18/ts4.8/assert/strict.d.ts +4 -4
- node v16.18/ts4.8/assert.d.ts +48 -24
- node v16.18/ts4.8/async_hooks.d.ts +10 -7
- node v16.18/ts4.8/buffer.d.ts +47 -24
- node v16.18/ts4.8/child_process.d.ts +262 -122
- node v16.18/ts4.8/cluster.d.ts +107 -89
- node v16.18/ts4.8/console.d.ts +7 -7
- node v16.18/ts4.8/constants.d.ts +12 -11
- node v16.18/ts4.8/crypto.d.ts +738 -267
- node v16.18/ts4.8/dgram.d.ts +81 -45
- node v16.18/ts4.8/diagnostics_channel.d.ts +3 -3
- node v16.18/ts4.8/dns/promises.d.ts +28 -25
- node v16.18/ts4.8/dns.d.ts +202 -61
- node v16.18/ts4.8/domain.d.ts +4 -4
- node v16.18/ts4.8/events.d.ts +15 -7
- node v16.18/ts4.8/fs/promises.d.ts +93 -64
- node v16.18/ts4.8/fs.d.ts +485 -290
- node v16.18/ts4.8/globals.d.ts +13 -13
- node v16.18/ts4.8/http.d.ts +176 -176
- node v16.18/ts4.8/http2.d.ts +628 -376
- node v16.18/ts4.8/https.d.ts +107 -105
- node v16.18/ts4.8/inspector.d.ts +3 -3
- node v16.18/ts4.8/module.d.ts +11 -8
- node v16.18/ts4.8/net.d.ts +106 -87
- node v16.18/ts4.8/os.d.ts +7 -7
- node v16.18/ts4.8/path.d.ts +13 -13
- node v16.18/ts4.8/perf_hooks.d.ts +17 -15
- node v16.18/ts4.8/process.d.ts +144 -124
- node v16.18/ts4.8/punycode.d.ts +3 -3
- node v16.18/ts4.8/querystring.d.ts +14 -4
- node v16.18/ts4.8/readline.d.ts +64 -54
- node v16.18/ts4.8/repl.d.ts +67 -61
- node v16.18/ts4.8/stream/consumers.d.ts +4 -4
- node v16.18/ts4.8/stream/promises.d.ts +56 -15
- node v16.18/ts4.8/stream/web.d.ts +19 -19
- node v16.18/ts4.8/stream.d.ts +309 -214
- node v16.18/ts4.8/string_decoder.d.ts +3 -3
- node v16.18/ts4.8/test.d.ts +2 -2
- node v16.18/ts4.8/timers/promises.d.ts +4 -4
- node v16.18/ts4.8/timers.d.ts +23 -8
- node v16.18/ts4.8/tls.d.ts +150 -71
- node v16.18/ts4.8/trace_events.d.ts +3 -3
- node v16.18/ts4.8/tty.d.ts +10 -10
- node v16.18/ts4.8/url.d.ts +26 -14
- node v16.18/ts4.8/util.d.ts +122 -51
- node v16.18/ts4.8/v8.d.ts +4 -4
- node v16.18/ts4.8/vm.d.ts +18 -18
- node v16.18/ts4.8/wasi.d.ts +3 -3
- node v16.18/ts4.8/worker_threads.d.ts +77 -77
- node v16.18/ts4.8/zlib.d.ts +9 -9
- node v16.18/tty.d.ts +10 -10
- node v16.18/url.d.ts +26 -14
- node v16.18/util.d.ts +122 -51
- node v16.18/v8.d.ts +4 -4
- node v16.18/vm.d.ts +18 -18
- node v16.18/wasi.d.ts +3 -3
- node v16.18/worker_threads.d.ts +77 -77
- node v16.18/zlib.d.ts +9 -9
node v16.18/tty.d.ts
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
|
|
25
25
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/tty.js)
|
|
26
26
|
*/
|
|
27
|
-
declare module
|
|
28
|
-
import * as net from
|
|
27
|
+
declare module "tty" {
|
|
28
|
+
import * as net from "node:net";
|
|
29
29
|
/**
|
|
30
30
|
* The `tty.isatty()` method returns `true` if the given `fd` is associated with
|
|
31
31
|
* a TTY and `false` if it is not, including whenever `fd` is not a non-negative
|
|
@@ -79,17 +79,17 @@ declare module 'node:tty' {
|
|
|
79
79
|
class WriteStream extends net.Socket {
|
|
80
80
|
constructor(fd: number);
|
|
81
81
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
82
|
-
addListener(event:
|
|
82
|
+
addListener(event: "resize", listener: () => void): this;
|
|
83
83
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
84
|
-
emit(event:
|
|
84
|
+
emit(event: "resize"): boolean;
|
|
85
85
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
86
|
-
on(event:
|
|
86
|
+
on(event: "resize", listener: () => void): this;
|
|
87
87
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
88
|
-
once(event:
|
|
88
|
+
once(event: "resize", listener: () => void): this;
|
|
89
89
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
90
|
-
prependListener(event:
|
|
90
|
+
prependListener(event: "resize", listener: () => void): this;
|
|
91
91
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
92
|
-
prependOnceListener(event:
|
|
92
|
+
prependOnceListener(event: "resize", listener: () => void): this;
|
|
93
93
|
/**
|
|
94
94
|
* `writeStream.clearLine()` clears the current line of this `WriteStream` in a
|
|
95
95
|
* direction identified by `dir`.
|
|
@@ -199,6 +199,6 @@ declare module 'node:tty' {
|
|
|
199
199
|
isTTY: boolean;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
declare module
|
|
203
|
-
export * from
|
|
202
|
+
declare module "node:tty" {
|
|
203
|
+
export * from "tty";
|
|
204
204
|
}
|
node v16.18/url.d.ts
CHANGED
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* ```
|
|
8
8
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/url.js)
|
|
9
9
|
*/
|
|
10
|
-
declare module
|
|
11
|
-
import { Blob } from
|
|
12
|
-
import { ClientRequestArgs } from
|
|
13
|
-
import { ParsedUrlQuery, ParsedUrlQueryInput } from
|
|
10
|
+
declare module "url" {
|
|
11
|
+
import { Blob } from "node:buffer";
|
|
12
|
+
import { ClientRequestArgs } from "node:http";
|
|
13
|
+
import { ParsedUrlQuery, ParsedUrlQueryInput } from "node:querystring";
|
|
14
14
|
// Input to `url.format`
|
|
15
15
|
interface UrlObject {
|
|
16
16
|
auth?: string | null | undefined;
|
|
@@ -72,7 +72,11 @@ declare module 'node:url' {
|
|
|
72
72
|
* result would be `{host: 'foo', pathname: '/bar'}` rather than `{pathname: '//foo/bar'}`.
|
|
73
73
|
*/
|
|
74
74
|
function parse(urlString: string): UrlWithStringQuery;
|
|
75
|
-
function parse(
|
|
75
|
+
function parse(
|
|
76
|
+
urlString: string,
|
|
77
|
+
parseQueryString: false | undefined,
|
|
78
|
+
slashesDenoteHost?: boolean,
|
|
79
|
+
): UrlWithStringQuery;
|
|
76
80
|
function parse(urlString: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
|
|
77
81
|
function parse(urlString: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
|
|
78
82
|
/**
|
|
@@ -711,7 +715,14 @@ declare module 'node:url' {
|
|
|
711
715
|
* @since v7.5.0, v6.13.0
|
|
712
716
|
*/
|
|
713
717
|
class URLSearchParams implements Iterable<[string, string]> {
|
|
714
|
-
constructor(
|
|
718
|
+
constructor(
|
|
719
|
+
init?:
|
|
720
|
+
| URLSearchParams
|
|
721
|
+
| string
|
|
722
|
+
| Record<string, string | ReadonlyArray<string>>
|
|
723
|
+
| Iterable<[string, string]>
|
|
724
|
+
| ReadonlyArray<[string, string]>,
|
|
725
|
+
);
|
|
715
726
|
readonly size: number;
|
|
716
727
|
/**
|
|
717
728
|
* Append a new name-value pair to the query string.
|
|
@@ -743,7 +754,10 @@ declare module 'node:url' {
|
|
|
743
754
|
* @param fn Invoked for each name-value pair in the query
|
|
744
755
|
* @param thisArg To be used as `this` value for when `fn` is called
|
|
745
756
|
*/
|
|
746
|
-
forEach<TThis = this>(
|
|
757
|
+
forEach<TThis = this>(
|
|
758
|
+
callback: (this: TThis, value: string, name: string, searchParams: URLSearchParams) => void,
|
|
759
|
+
thisArg?: TThis,
|
|
760
|
+
): void;
|
|
747
761
|
/**
|
|
748
762
|
* Returns the value of the first name-value pair whose name is `name`. If there
|
|
749
763
|
* are no such pairs, `null` is returned.
|
|
@@ -821,7 +835,7 @@ declare module 'node:url' {
|
|
|
821
835
|
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
822
836
|
}
|
|
823
837
|
|
|
824
|
-
import { URL as _URL, URLSearchParams as _URLSearchParams } from
|
|
838
|
+
import { URL as _URL, URLSearchParams as _URLSearchParams } from "url";
|
|
825
839
|
global {
|
|
826
840
|
interface URLSearchParams extends _URLSearchParams {}
|
|
827
841
|
interface URL extends _URL {}
|
|
@@ -836,8 +850,7 @@ declare module 'node:url' {
|
|
|
836
850
|
*/
|
|
837
851
|
var URL:
|
|
838
852
|
// For compatibility with "dom" and "webworker" URL declarations
|
|
839
|
-
typeof globalThis extends { onmessage: any
|
|
840
|
-
? URL
|
|
853
|
+
typeof globalThis extends { onmessage: any; URL: infer URL } ? URL
|
|
841
854
|
: typeof _URL;
|
|
842
855
|
/**
|
|
843
856
|
* `URLSearchParams` class is a global reference for `require('url').URLSearchParams`.
|
|
@@ -846,11 +859,10 @@ declare module 'node:url' {
|
|
|
846
859
|
*/
|
|
847
860
|
var URLSearchParams:
|
|
848
861
|
// For compatibility with "dom" and "webworker" URLSearchParams declarations
|
|
849
|
-
typeof globalThis extends { onmessage: any
|
|
850
|
-
? URLSearchParams
|
|
862
|
+
typeof globalThis extends { onmessage: any; URLSearchParams: infer URLSearchParams } ? URLSearchParams
|
|
851
863
|
: typeof _URLSearchParams;
|
|
852
864
|
}
|
|
853
865
|
}
|
|
854
|
-
declare module
|
|
855
|
-
export * from
|
|
866
|
+
declare module "node:url" {
|
|
867
|
+
export * from "url";
|
|
856
868
|
}
|
node v16.18/util.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* ```
|
|
9
9
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/util.js)
|
|
10
10
|
*/
|
|
11
|
-
declare module
|
|
12
|
-
import * as types from
|
|
11
|
+
declare module "util" {
|
|
12
|
+
import * as types from "node:util/types";
|
|
13
13
|
export interface InspectOptions {
|
|
14
14
|
/**
|
|
15
15
|
* If set to `true`, getters are going to be
|
|
@@ -19,7 +19,7 @@ declare module 'node:util' {
|
|
|
19
19
|
* the getter function.
|
|
20
20
|
* @default `false`
|
|
21
21
|
*/
|
|
22
|
-
getters?:
|
|
22
|
+
getters?: "get" | "set" | boolean | undefined;
|
|
23
23
|
showHidden?: boolean | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* @default 2
|
|
@@ -50,7 +50,18 @@ declare module 'node:util' {
|
|
|
50
50
|
compact?: boolean | number | undefined;
|
|
51
51
|
sorted?: boolean | ((a: string, b: string) => number) | undefined;
|
|
52
52
|
}
|
|
53
|
-
export type Style =
|
|
53
|
+
export type Style =
|
|
54
|
+
| "special"
|
|
55
|
+
| "number"
|
|
56
|
+
| "bigint"
|
|
57
|
+
| "boolean"
|
|
58
|
+
| "undefined"
|
|
59
|
+
| "null"
|
|
60
|
+
| "string"
|
|
61
|
+
| "symbol"
|
|
62
|
+
| "date"
|
|
63
|
+
| "regexp"
|
|
64
|
+
| "module";
|
|
54
65
|
export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
|
|
55
66
|
export interface InspectOptionsStylized extends InspectOptions {
|
|
56
67
|
stylize(text: string, styleType: Style): string;
|
|
@@ -867,40 +878,83 @@ declare module 'node:util' {
|
|
|
867
878
|
* @return a callback style function
|
|
868
879
|
*/
|
|
869
880
|
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
870
|
-
export function callbackify<TResult>(
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
export function callbackify<T1
|
|
874
|
-
|
|
875
|
-
|
|
881
|
+
export function callbackify<TResult>(
|
|
882
|
+
fn: () => Promise<TResult>,
|
|
883
|
+
): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
884
|
+
export function callbackify<T1>(
|
|
885
|
+
fn: (arg1: T1) => Promise<void>,
|
|
886
|
+
): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
887
|
+
export function callbackify<T1, TResult>(
|
|
888
|
+
fn: (arg1: T1) => Promise<TResult>,
|
|
889
|
+
): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
890
|
+
export function callbackify<T1, T2>(
|
|
891
|
+
fn: (arg1: T1, arg2: T2) => Promise<void>,
|
|
892
|
+
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
893
|
+
export function callbackify<T1, T2, TResult>(
|
|
894
|
+
fn: (arg1: T1, arg2: T2) => Promise<TResult>,
|
|
895
|
+
): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
896
|
+
export function callbackify<T1, T2, T3>(
|
|
897
|
+
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>,
|
|
898
|
+
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
876
899
|
export function callbackify<T1, T2, T3, TResult>(
|
|
877
|
-
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult
|
|
900
|
+
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>,
|
|
878
901
|
): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
879
902
|
export function callbackify<T1, T2, T3, T4>(
|
|
880
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void
|
|
903
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>,
|
|
881
904
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
882
905
|
export function callbackify<T1, T2, T3, T4, TResult>(
|
|
883
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult
|
|
884
|
-
): (
|
|
906
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>,
|
|
907
|
+
): (
|
|
908
|
+
arg1: T1,
|
|
909
|
+
arg2: T2,
|
|
910
|
+
arg3: T3,
|
|
911
|
+
arg4: T4,
|
|
912
|
+
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
|
913
|
+
) => void;
|
|
885
914
|
export function callbackify<T1, T2, T3, T4, T5>(
|
|
886
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void
|
|
915
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>,
|
|
887
916
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
888
917
|
export function callbackify<T1, T2, T3, T4, T5, TResult>(
|
|
889
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult
|
|
890
|
-
): (
|
|
918
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
|
|
919
|
+
): (
|
|
920
|
+
arg1: T1,
|
|
921
|
+
arg2: T2,
|
|
922
|
+
arg3: T3,
|
|
923
|
+
arg4: T4,
|
|
924
|
+
arg5: T5,
|
|
925
|
+
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
|
926
|
+
) => void;
|
|
891
927
|
export function callbackify<T1, T2, T3, T4, T5, T6>(
|
|
892
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void
|
|
893
|
-
): (
|
|
928
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
|
|
929
|
+
): (
|
|
930
|
+
arg1: T1,
|
|
931
|
+
arg2: T2,
|
|
932
|
+
arg3: T3,
|
|
933
|
+
arg4: T4,
|
|
934
|
+
arg5: T5,
|
|
935
|
+
arg6: T6,
|
|
936
|
+
callback: (err: NodeJS.ErrnoException) => void,
|
|
937
|
+
) => void;
|
|
894
938
|
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
|
895
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult
|
|
896
|
-
): (
|
|
939
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>,
|
|
940
|
+
): (
|
|
941
|
+
arg1: T1,
|
|
942
|
+
arg2: T2,
|
|
943
|
+
arg3: T3,
|
|
944
|
+
arg4: T4,
|
|
945
|
+
arg5: T5,
|
|
946
|
+
arg6: T6,
|
|
947
|
+
callback: (err: NodeJS.ErrnoException | null, result: TResult) => void,
|
|
948
|
+
) => void;
|
|
897
949
|
export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
|
|
898
950
|
__promisify__: TCustom;
|
|
899
951
|
}
|
|
900
952
|
export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
|
|
901
953
|
[promisify.custom]: TCustom;
|
|
902
954
|
}
|
|
903
|
-
export type CustomPromisify<TCustom extends Function> =
|
|
955
|
+
export type CustomPromisify<TCustom extends Function> =
|
|
956
|
+
| CustomPromisifySymbol<TCustom>
|
|
957
|
+
| CustomPromisifyLegacy<TCustom>;
|
|
904
958
|
/**
|
|
905
959
|
* Takes a function following the common error-first callback style, i.e. taking
|
|
906
960
|
* an `(err, value) => ...` callback as the last argument, and returns a version
|
|
@@ -969,23 +1023,37 @@ declare module 'node:util' {
|
|
|
969
1023
|
* @since v8.0.0
|
|
970
1024
|
*/
|
|
971
1025
|
export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
972
|
-
export function promisify<TResult>(
|
|
1026
|
+
export function promisify<TResult>(
|
|
1027
|
+
fn: (callback: (err: any, result: TResult) => void) => void,
|
|
1028
|
+
): () => Promise<TResult>;
|
|
973
1029
|
export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
|
|
974
|
-
export function promisify<T1, TResult>(
|
|
1030
|
+
export function promisify<T1, TResult>(
|
|
1031
|
+
fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void,
|
|
1032
|
+
): (arg1: T1) => Promise<TResult>;
|
|
975
1033
|
export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
|
|
976
|
-
export function promisify<T1, T2, TResult>(
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
export function promisify<T1, T2
|
|
1034
|
+
export function promisify<T1, T2, TResult>(
|
|
1035
|
+
fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void,
|
|
1036
|
+
): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
1037
|
+
export function promisify<T1, T2>(
|
|
1038
|
+
fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void,
|
|
1039
|
+
): (arg1: T1, arg2: T2) => Promise<void>;
|
|
1040
|
+
export function promisify<T1, T2, T3, TResult>(
|
|
1041
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void,
|
|
1042
|
+
): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
|
1043
|
+
export function promisify<T1, T2, T3>(
|
|
1044
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void,
|
|
1045
|
+
): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
|
980
1046
|
export function promisify<T1, T2, T3, T4, TResult>(
|
|
981
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void
|
|
1047
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
|
|
982
1048
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
|
983
|
-
export function promisify<T1, T2, T3, T4>(
|
|
1049
|
+
export function promisify<T1, T2, T3, T4>(
|
|
1050
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void,
|
|
1051
|
+
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
|
984
1052
|
export function promisify<T1, T2, T3, T4, T5, TResult>(
|
|
985
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void
|
|
1053
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
|
|
986
1054
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
|
987
1055
|
export function promisify<T1, T2, T3, T4, T5>(
|
|
988
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void
|
|
1056
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
|
|
989
1057
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
990
1058
|
export function promisify(fn: Function): Function;
|
|
991
1059
|
export namespace promisify {
|
|
@@ -1028,7 +1096,7 @@ declare module 'node:util' {
|
|
|
1028
1096
|
options?: {
|
|
1029
1097
|
fatal?: boolean | undefined;
|
|
1030
1098
|
ignoreBOM?: boolean | undefined;
|
|
1031
|
-
}
|
|
1099
|
+
},
|
|
1032
1100
|
);
|
|
1033
1101
|
/**
|
|
1034
1102
|
* Decodes the `input` and returns a string. If `options.stream` is `true`, any
|
|
@@ -1042,7 +1110,7 @@ declare module 'node:util' {
|
|
|
1042
1110
|
input?: NodeJS.ArrayBufferView | ArrayBuffer | null,
|
|
1043
1111
|
options?: {
|
|
1044
1112
|
stream?: boolean | undefined;
|
|
1045
|
-
}
|
|
1113
|
+
},
|
|
1046
1114
|
): string;
|
|
1047
1115
|
}
|
|
1048
1116
|
export interface EncodeIntoResult {
|
|
@@ -1095,18 +1163,17 @@ declare module 'node:util' {
|
|
|
1095
1163
|
encodeInto(src: string, dest: Uint8Array): EncodeIntoResult;
|
|
1096
1164
|
}
|
|
1097
1165
|
|
|
1098
|
-
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from
|
|
1166
|
+
import { TextDecoder as _TextDecoder, TextEncoder as _TextEncoder } from "util";
|
|
1099
1167
|
global {
|
|
1100
1168
|
/**
|
|
1101
1169
|
* `TextDecoder` class is a global reference for `require('util').TextDecoder`
|
|
1102
1170
|
* https://nodejs.org/api/globals.html#textdecoder
|
|
1103
1171
|
* @since v11.0.0
|
|
1104
1172
|
*/
|
|
1105
|
-
|
|
1173
|
+
var TextDecoder: typeof globalThis extends {
|
|
1106
1174
|
onmessage: any;
|
|
1107
1175
|
TextDecoder: infer TextDecoder;
|
|
1108
|
-
}
|
|
1109
|
-
? TextDecoder
|
|
1176
|
+
} ? TextDecoder
|
|
1110
1177
|
: typeof _TextDecoder;
|
|
1111
1178
|
|
|
1112
1179
|
/**
|
|
@@ -1114,19 +1181,18 @@ declare module 'node:util' {
|
|
|
1114
1181
|
* https://nodejs.org/api/globals.html#textencoder
|
|
1115
1182
|
* @since v11.0.0
|
|
1116
1183
|
*/
|
|
1117
|
-
|
|
1184
|
+
var TextEncoder: typeof globalThis extends {
|
|
1118
1185
|
onmessage: any;
|
|
1119
1186
|
TextEncoder: infer TextEncoder;
|
|
1120
|
-
}
|
|
1121
|
-
? TextEncoder
|
|
1187
|
+
} ? TextEncoder
|
|
1122
1188
|
: typeof _TextEncoder;
|
|
1123
1189
|
}
|
|
1124
1190
|
}
|
|
1125
|
-
declare module
|
|
1126
|
-
export * from
|
|
1191
|
+
declare module "util/types" {
|
|
1192
|
+
export * from "util/types";
|
|
1127
1193
|
}
|
|
1128
|
-
declare module
|
|
1129
|
-
import { KeyObject, webcrypto } from
|
|
1194
|
+
declare module "util/types" {
|
|
1195
|
+
import { KeyObject, webcrypto } from "node:crypto";
|
|
1130
1196
|
/**
|
|
1131
1197
|
* Returns `true` if the value is a built-in [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) or
|
|
1132
1198
|
* [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instance.
|
|
@@ -1392,7 +1458,10 @@ declare module 'util/types' {
|
|
|
1392
1458
|
* ```
|
|
1393
1459
|
* @since v10.0.0
|
|
1394
1460
|
*/
|
|
1395
|
-
function isMap<T>(
|
|
1461
|
+
function isMap<T>(
|
|
1462
|
+
object: T | {},
|
|
1463
|
+
): object is T extends ReadonlyMap<any, any> ? (unknown extends T ? never : ReadonlyMap<any, any>)
|
|
1464
|
+
: Map<unknown, unknown>;
|
|
1396
1465
|
/**
|
|
1397
1466
|
* Returns `true` if the value is an iterator returned for a built-in [`Map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) instance.
|
|
1398
1467
|
*
|
|
@@ -1478,7 +1547,9 @@ declare module 'util/types' {
|
|
|
1478
1547
|
* ```
|
|
1479
1548
|
* @since v10.0.0
|
|
1480
1549
|
*/
|
|
1481
|
-
function isSet<T>(
|
|
1550
|
+
function isSet<T>(
|
|
1551
|
+
object: T | {},
|
|
1552
|
+
): object is T extends ReadonlySet<any> ? (unknown extends T ? never : ReadonlySet<any>) : Set<unknown>;
|
|
1482
1553
|
/**
|
|
1483
1554
|
* Returns `true` if the value is an iterator returned for a built-in [`Set`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) instance.
|
|
1484
1555
|
*
|
|
@@ -1613,9 +1684,9 @@ declare module 'util/types' {
|
|
|
1613
1684
|
*/
|
|
1614
1685
|
function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
|
|
1615
1686
|
}
|
|
1616
|
-
declare module
|
|
1617
|
-
export * from
|
|
1687
|
+
declare module "node:util" {
|
|
1688
|
+
export * from "util";
|
|
1618
1689
|
}
|
|
1619
|
-
declare module
|
|
1620
|
-
export * from
|
|
1690
|
+
declare module "node:util/types" {
|
|
1691
|
+
export * from "util/types";
|
|
1621
1692
|
}
|
node v16.18/v8.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* ```
|
|
7
7
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/v8.js)
|
|
8
8
|
*/
|
|
9
|
-
declare module
|
|
10
|
-
import { Readable } from
|
|
9
|
+
declare module "v8" {
|
|
10
|
+
import { Readable } from "node:stream";
|
|
11
11
|
interface HeapSpaceInfo {
|
|
12
12
|
space_name: string;
|
|
13
13
|
space_size: number;
|
|
@@ -467,6 +467,6 @@ declare module 'node:v8' {
|
|
|
467
467
|
*/
|
|
468
468
|
const promiseHooks: PromiseHooks;
|
|
469
469
|
}
|
|
470
|
-
declare module
|
|
471
|
-
export * from
|
|
470
|
+
declare module "node:v8" {
|
|
471
|
+
export * from "v8";
|
|
472
472
|
}
|
node v16.18/vm.d.ts
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
* ```
|
|
35
35
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/vm.js)
|
|
36
36
|
*/
|
|
37
|
-
declare module
|
|
37
|
+
declare module "vm" {
|
|
38
38
|
interface Context extends NodeJS.Dict<any> {}
|
|
39
39
|
interface BaseOptions {
|
|
40
40
|
/**
|
|
@@ -81,7 +81,7 @@ declare module 'node:vm' {
|
|
|
81
81
|
/**
|
|
82
82
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
83
83
|
*/
|
|
84
|
-
microtaskMode?:
|
|
84
|
+
microtaskMode?: "afterEvaluate" | undefined;
|
|
85
85
|
}
|
|
86
86
|
interface CompileFunctionOptions extends BaseOptions {
|
|
87
87
|
/**
|
|
@@ -118,25 +118,25 @@ declare module 'node:vm' {
|
|
|
118
118
|
origin?: string | undefined;
|
|
119
119
|
codeGeneration?:
|
|
120
120
|
| {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
121
|
+
/**
|
|
122
|
+
* If set to false any calls to eval or function constructors (Function, GeneratorFunction, etc)
|
|
123
|
+
* will throw an EvalError.
|
|
124
|
+
* @default true
|
|
125
|
+
*/
|
|
126
|
+
strings?: boolean | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* If set to false any attempt to compile a WebAssembly module will throw a WebAssembly.CompileError.
|
|
129
|
+
* @default true
|
|
130
|
+
*/
|
|
131
|
+
wasm?: boolean | undefined;
|
|
132
|
+
}
|
|
133
133
|
| undefined;
|
|
134
134
|
/**
|
|
135
135
|
* If set to `afterEvaluate`, microtasks will be run immediately after the script has run.
|
|
136
136
|
*/
|
|
137
|
-
microtaskMode?:
|
|
137
|
+
microtaskMode?: "afterEvaluate" | undefined;
|
|
138
138
|
}
|
|
139
|
-
type MeasureMemoryMode =
|
|
139
|
+
type MeasureMemoryMode = "summary" | "detailed";
|
|
140
140
|
interface MeasureMemoryOptions {
|
|
141
141
|
/**
|
|
142
142
|
* @default 'summary'
|
|
@@ -502,6 +502,6 @@ declare module 'node:vm' {
|
|
|
502
502
|
*/
|
|
503
503
|
function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
|
|
504
504
|
}
|
|
505
|
-
declare module
|
|
506
|
-
export * from
|
|
505
|
+
declare module "node:vm" {
|
|
506
|
+
export * from "vm";
|
|
507
507
|
}
|
node v16.18/wasi.d.ts
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
* @experimental
|
|
71
71
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/wasi.js)
|
|
72
72
|
*/
|
|
73
|
-
declare module
|
|
73
|
+
declare module "wasi" {
|
|
74
74
|
interface WASIOptions {
|
|
75
75
|
/**
|
|
76
76
|
* An array of strings that the WebAssembly application will
|
|
@@ -153,6 +153,6 @@ declare module 'node:wasi' {
|
|
|
153
153
|
readonly wasiImport: NodeJS.Dict<any>; // TODO: Narrow to DOM types
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
declare module
|
|
157
|
-
export * from
|
|
156
|
+
declare module "node:wasi" {
|
|
157
|
+
export * from "wasi";
|
|
158
158
|
}
|