@types/node 15.0.0 → 15.3.0
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/README.md +2 -2
- node/assert.d.ts +0 -5
- node/async_hooks.d.ts +2 -9
- node/buffer.d.ts +0 -4
- node/child_process.d.ts +11 -8
- node/cluster.d.ts +3 -7
- node/console.d.ts +1 -5
- node/constants.d.ts +3 -9
- node/crypto.d.ts +1 -5
- node/dgram.d.ts +3 -7
- node/diagnostic_channel.d.ts +34 -0
- node/dns/promises.d.ts +1 -5
- node/dns.d.ts +1 -5
- node/domain.d.ts +1 -5
- node/events.d.ts +4 -5
- node/fs/promises.d.ts +7 -10
- node/fs.d.ts +36 -22
- node/http.d.ts +4 -7
- node/http2.d.ts +19 -18
- node/https.d.ts +3 -7
- node/index.d.ts +1 -2
- node/inspector.d.ts +1 -8
- node/module.d.ts +1 -6
- node/net.d.ts +7 -9
- node/os.d.ts +0 -4
- node/package.json +2 -7
- node/path.d.ts +6 -1
- node/perf_hooks.d.ts +8 -9
- node/process.d.ts +1 -5
- node/punycode.d.ts +0 -11
- node/querystring.d.ts +0 -4
- node/readline.d.ts +2 -5
- node/repl.d.ts +6 -10
- node/stream/promises.d.ts +0 -4
- node/stream.d.ts +2 -7
- node/string_decoder.d.ts +0 -4
- node/timers/promises.d.ts +1 -5
- node/timers.d.ts +0 -4
- node/tls.d.ts +1 -5
- node/trace_events.d.ts +0 -4
- node/ts3.6/assert.d.ts +0 -5
- node/ts3.6/base.d.ts +2 -0
- node/tty.d.ts +1 -5
- node/url.d.ts +1 -5
- node/util/types.d.ts +57 -0
- node/util.d.ts +68 -123
- node/v8.d.ts +12 -5
- node/vm.d.ts +1 -5
- node/wasi.d.ts +0 -4
- node/worker_threads.d.ts +11 -9
- node/zlib.d.ts +1 -5
node/util.d.ts
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
declare module 'node:util' {
|
|
2
|
-
export * from 'util';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'util' {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import * as types from 'util/types';
|
|
3
|
+
|
|
4
|
+
export interface InspectOptions extends NodeJS.InspectOptions { }
|
|
5
|
+
export type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
|
|
6
|
+
export type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
|
|
7
|
+
export interface InspectOptionsStylized extends InspectOptions {
|
|
10
8
|
stylize(text: string, styleType: Style): string;
|
|
11
9
|
}
|
|
12
|
-
function format(format?: any, ...param: any[]): string;
|
|
13
|
-
function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
10
|
+
export function format(format?: any, ...param: any[]): string;
|
|
11
|
+
export function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
|
|
14
12
|
/** @deprecated since v0.11.3 - use a third party module instead. */
|
|
15
|
-
function log(string: string): void;
|
|
16
|
-
function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
17
|
-
function inspect(object: any, options: InspectOptions): string;
|
|
18
|
-
namespace inspect {
|
|
13
|
+
export function log(string: string): void;
|
|
14
|
+
export function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
|
|
15
|
+
export function inspect(object: any, options: InspectOptions): string;
|
|
16
|
+
export namespace inspect {
|
|
19
17
|
let colors: NodeJS.Dict<[number, number]>;
|
|
20
18
|
let styles: {
|
|
21
19
|
[K in Style]: string
|
|
@@ -28,156 +26,101 @@ declare module 'util' {
|
|
|
28
26
|
const custom: unique symbol;
|
|
29
27
|
}
|
|
30
28
|
/** @deprecated since v4.0.0 - use `Array.isArray()` instead. */
|
|
31
|
-
function isArray(object: any): object is any[];
|
|
29
|
+
export function isArray(object: any): object is any[];
|
|
32
30
|
/** @deprecated since v4.0.0 - use `util.types.isRegExp()` instead. */
|
|
33
|
-
function isRegExp(object: any): object is RegExp;
|
|
31
|
+
export function isRegExp(object: any): object is RegExp;
|
|
34
32
|
/** @deprecated since v4.0.0 - use `util.types.isDate()` instead. */
|
|
35
|
-
function isDate(object: any): object is Date;
|
|
33
|
+
export function isDate(object: any): object is Date;
|
|
36
34
|
/** @deprecated since v4.0.0 - use `util.types.isNativeError()` instead. */
|
|
37
|
-
function isError(object: any): object is Error;
|
|
38
|
-
function inherits(constructor: any, superConstructor: any): void;
|
|
39
|
-
function debuglog(key: string): (msg: string, ...param: any[]) => void;
|
|
35
|
+
export function isError(object: any): object is Error;
|
|
36
|
+
export function inherits(constructor: any, superConstructor: any): void;
|
|
37
|
+
export function debuglog(key: string): (msg: string, ...param: any[]) => void;
|
|
40
38
|
/** @deprecated since v4.0.0 - use `typeof value === 'boolean'` instead. */
|
|
41
|
-
function isBoolean(object: any): object is boolean;
|
|
39
|
+
export function isBoolean(object: any): object is boolean;
|
|
42
40
|
/** @deprecated since v4.0.0 - use `Buffer.isBuffer()` instead. */
|
|
43
|
-
function isBuffer(object: any): object is Buffer;
|
|
41
|
+
export function isBuffer(object: any): object is Buffer;
|
|
44
42
|
/** @deprecated since v4.0.0 - use `typeof value === 'function'` instead. */
|
|
45
|
-
function isFunction(object: any): boolean;
|
|
43
|
+
export function isFunction(object: any): boolean;
|
|
46
44
|
/** @deprecated since v4.0.0 - use `value === null` instead. */
|
|
47
|
-
function isNull(object: any): object is null;
|
|
45
|
+
export function isNull(object: any): object is null;
|
|
48
46
|
/** @deprecated since v4.0.0 - use `value === null || value === undefined` instead. */
|
|
49
|
-
function isNullOrUndefined(object: any): object is null | undefined;
|
|
47
|
+
export function isNullOrUndefined(object: any): object is null | undefined;
|
|
50
48
|
/** @deprecated since v4.0.0 - use `typeof value === 'number'` instead. */
|
|
51
|
-
function isNumber(object: any): object is number;
|
|
49
|
+
export function isNumber(object: any): object is number;
|
|
52
50
|
/** @deprecated since v4.0.0 - use `value !== null && typeof value === 'object'` instead. */
|
|
53
|
-
function isObject(object: any): boolean;
|
|
51
|
+
export function isObject(object: any): boolean;
|
|
54
52
|
/** @deprecated since v4.0.0 - use `(typeof value !== 'object' && typeof value !== 'function') || value === null` instead. */
|
|
55
|
-
function isPrimitive(object: any): boolean;
|
|
53
|
+
export function isPrimitive(object: any): boolean;
|
|
56
54
|
/** @deprecated since v4.0.0 - use `typeof value === 'string'` instead. */
|
|
57
|
-
function isString(object: any): object is string;
|
|
55
|
+
export function isString(object: any): object is string;
|
|
58
56
|
/** @deprecated since v4.0.0 - use `typeof value === 'symbol'` instead. */
|
|
59
|
-
function isSymbol(object: any): object is symbol;
|
|
57
|
+
export function isSymbol(object: any): object is symbol;
|
|
60
58
|
/** @deprecated since v4.0.0 - use `value === undefined` instead. */
|
|
61
|
-
function isUndefined(object: any): object is undefined;
|
|
62
|
-
function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
|
|
63
|
-
function isDeepStrictEqual(val1: any, val2: any): boolean;
|
|
59
|
+
export function isUndefined(object: any): object is undefined;
|
|
60
|
+
export function deprecate<T extends Function>(fn: T, message: string, code?: string): T;
|
|
61
|
+
export function isDeepStrictEqual(val1: any, val2: any): boolean;
|
|
64
62
|
|
|
65
|
-
function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
66
|
-
function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
67
|
-
function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
68
|
-
function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
69
|
-
function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
70
|
-
function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
71
|
-
function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
72
|
-
function callbackify<T1, T2, T3, TResult>(
|
|
63
|
+
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
64
|
+
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
65
|
+
export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
66
|
+
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
67
|
+
export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
68
|
+
export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
69
|
+
export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
70
|
+
export function callbackify<T1, T2, T3, TResult>(
|
|
73
71
|
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
74
|
-
|
|
72
|
+
export function callbackify<T1, T2, T3, T4>(
|
|
75
73
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
76
|
-
|
|
74
|
+
export function callbackify<T1, T2, T3, T4, TResult>(
|
|
77
75
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
78
|
-
|
|
76
|
+
export function callbackify<T1, T2, T3, T4, T5>(
|
|
79
77
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
80
|
-
|
|
78
|
+
export function callbackify<T1, T2, T3, T4, T5, TResult>(
|
|
81
79
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
|
|
82
80
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
83
|
-
function callbackify<T1, T2, T3, T4, T5, T6>(
|
|
81
|
+
export function callbackify<T1, T2, T3, T4, T5, T6>(
|
|
84
82
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
|
|
85
83
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
86
|
-
function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
|
84
|
+
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
|
87
85
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
|
|
88
86
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
89
87
|
|
|
90
|
-
interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
|
|
88
|
+
export interface CustomPromisifyLegacy<TCustom extends Function> extends Function {
|
|
91
89
|
__promisify__: TCustom;
|
|
92
90
|
}
|
|
93
91
|
|
|
94
|
-
interface CustomPromisifySymbol<TCustom extends Function> extends Function {
|
|
92
|
+
export interface CustomPromisifySymbol<TCustom extends Function> extends Function {
|
|
95
93
|
[promisify.custom]: TCustom;
|
|
96
94
|
}
|
|
97
95
|
|
|
98
|
-
type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
|
|
96
|
+
export type CustomPromisify<TCustom extends Function> = CustomPromisifySymbol<TCustom> | CustomPromisifyLegacy<TCustom>;
|
|
99
97
|
|
|
100
|
-
function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
101
|
-
function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
|
|
102
|
-
function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
|
|
103
|
-
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
104
|
-
function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
|
|
105
|
-
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
106
|
-
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
107
|
-
function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
|
|
98
|
+
export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
99
|
+
export function promisify<TResult>(fn: (callback: (err: any, result: TResult) => void) => void): () => Promise<TResult>;
|
|
100
|
+
export function promisify(fn: (callback: (err?: any) => void) => void): () => Promise<void>;
|
|
101
|
+
export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: any, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
102
|
+
export function promisify<T1>(fn: (arg1: T1, callback: (err?: any) => void) => void): (arg1: T1) => Promise<void>;
|
|
103
|
+
export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: any, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
104
|
+
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
105
|
+
export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: any, result: TResult) => void) => void):
|
|
108
106
|
(arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
|
109
|
-
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
|
110
|
-
function promisify<T1, T2, T3, T4, TResult>(
|
|
107
|
+
export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: any) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
|
108
|
+
export function promisify<T1, T2, T3, T4, TResult>(
|
|
111
109
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: any, result: TResult) => void) => void,
|
|
112
110
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
|
113
|
-
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
|
|
111
|
+
export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: any) => void) => void):
|
|
114
112
|
(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
|
115
|
-
|
|
113
|
+
export function promisify<T1, T2, T3, T4, T5, TResult>(
|
|
116
114
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: any, result: TResult) => void) => void,
|
|
117
115
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
|
118
|
-
function promisify<T1, T2, T3, T4, T5>(
|
|
116
|
+
export function promisify<T1, T2, T3, T4, T5>(
|
|
119
117
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: any) => void) => void,
|
|
120
118
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
121
|
-
function promisify(fn: Function): Function;
|
|
122
|
-
namespace promisify {
|
|
119
|
+
export function promisify(fn: Function): Function;
|
|
120
|
+
export namespace promisify {
|
|
123
121
|
const custom: unique symbol;
|
|
124
122
|
}
|
|
125
|
-
|
|
126
|
-
namespace types {
|
|
127
|
-
function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
|
|
128
|
-
function isArgumentsObject(object: any): object is IArguments;
|
|
129
|
-
function isArrayBuffer(object: any): object is ArrayBuffer;
|
|
130
|
-
function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
|
|
131
|
-
function isAsyncFunction(object: any): boolean;
|
|
132
|
-
function isBigInt64Array(value: any): value is BigInt64Array;
|
|
133
|
-
function isBigUint64Array(value: any): value is BigUint64Array;
|
|
134
|
-
function isBooleanObject(object: any): object is Boolean;
|
|
135
|
-
function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
|
|
136
|
-
function isDataView(object: any): object is DataView;
|
|
137
|
-
function isDate(object: any): object is Date;
|
|
138
|
-
function isExternal(object: any): boolean;
|
|
139
|
-
function isFloat32Array(object: any): object is Float32Array;
|
|
140
|
-
function isFloat64Array(object: any): object is Float64Array;
|
|
141
|
-
function isGeneratorFunction(object: any): object is GeneratorFunction;
|
|
142
|
-
function isGeneratorObject(object: any): object is Generator;
|
|
143
|
-
function isInt8Array(object: any): object is Int8Array;
|
|
144
|
-
function isInt16Array(object: any): object is Int16Array;
|
|
145
|
-
function isInt32Array(object: any): object is Int32Array;
|
|
146
|
-
function isMap<T>(
|
|
147
|
-
object: T | {},
|
|
148
|
-
): object is T extends ReadonlyMap<any, any>
|
|
149
|
-
? unknown extends T
|
|
150
|
-
? never
|
|
151
|
-
: ReadonlyMap<any, any>
|
|
152
|
-
: Map<any, any>;
|
|
153
|
-
function isMapIterator(object: any): boolean;
|
|
154
|
-
function isModuleNamespaceObject(value: any): boolean;
|
|
155
|
-
function isNativeError(object: any): object is Error;
|
|
156
|
-
function isNumberObject(object: any): object is Number;
|
|
157
|
-
function isPromise(object: any): object is Promise<any>;
|
|
158
|
-
function isProxy(object: any): boolean;
|
|
159
|
-
function isRegExp(object: any): object is RegExp;
|
|
160
|
-
function isSet<T>(
|
|
161
|
-
object: T | {},
|
|
162
|
-
): object is T extends ReadonlySet<any>
|
|
163
|
-
? unknown extends T
|
|
164
|
-
? never
|
|
165
|
-
: ReadonlySet<any>
|
|
166
|
-
: Set<any>;
|
|
167
|
-
function isSetIterator(object: any): boolean;
|
|
168
|
-
function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
|
|
169
|
-
function isStringObject(object: any): object is String;
|
|
170
|
-
function isSymbolObject(object: any): object is Symbol;
|
|
171
|
-
function isTypedArray(object: any): object is NodeJS.TypedArray;
|
|
172
|
-
function isUint8Array(object: any): object is Uint8Array;
|
|
173
|
-
function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
|
|
174
|
-
function isUint16Array(object: any): object is Uint16Array;
|
|
175
|
-
function isUint32Array(object: any): object is Uint32Array;
|
|
176
|
-
function isWeakMap(object: any): object is WeakMap<any, any>;
|
|
177
|
-
function isWeakSet(object: any): object is WeakSet<any>;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
class TextDecoder {
|
|
123
|
+
export class TextDecoder {
|
|
181
124
|
readonly encoding: string;
|
|
182
125
|
readonly fatal: boolean;
|
|
183
126
|
readonly ignoreBOM: boolean;
|
|
@@ -191,7 +134,7 @@ declare module 'util' {
|
|
|
191
134
|
): string;
|
|
192
135
|
}
|
|
193
136
|
|
|
194
|
-
interface EncodeIntoResult {
|
|
137
|
+
export interface EncodeIntoResult {
|
|
195
138
|
/**
|
|
196
139
|
* The read Unicode code units of input.
|
|
197
140
|
*/
|
|
@@ -203,7 +146,9 @@ declare module 'util' {
|
|
|
203
146
|
written: number;
|
|
204
147
|
}
|
|
205
148
|
|
|
206
|
-
|
|
149
|
+
export { types };
|
|
150
|
+
|
|
151
|
+
export class TextEncoder {
|
|
207
152
|
readonly encoding: string;
|
|
208
153
|
encode(input?: string): Uint8Array;
|
|
209
154
|
encodeInto(input: string, output: Uint8Array): EncodeIntoResult;
|
node/v8.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare module 'node:v8' {
|
|
2
|
-
export * from 'v8';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'v8' {
|
|
6
|
-
import { Readable } from '
|
|
2
|
+
import { Readable } from 'stream';
|
|
7
3
|
|
|
8
4
|
interface HeapSpaceInfo {
|
|
9
5
|
space_name: string;
|
|
@@ -188,4 +184,15 @@ declare module 'v8' {
|
|
|
188
184
|
* Uses a `DefaultDeserializer` with default options to read a JS value from a buffer.
|
|
189
185
|
*/
|
|
190
186
|
function deserialize(data: NodeJS.TypedArray): any;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Begins writing coverage report based on the `NODE_V8_COVERAGE` env var.
|
|
190
|
+
* Noop is the env var is not set.
|
|
191
|
+
*/
|
|
192
|
+
function takeCoverage(): void;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Stops writing coverage report.
|
|
196
|
+
*/
|
|
197
|
+
function stopCoverage(): void;
|
|
191
198
|
}
|
node/vm.d.ts
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
declare module 'node:vm' {
|
|
2
|
-
export * from 'vm';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'vm' {
|
|
6
2
|
interface Context extends NodeJS.Dict<any> { }
|
|
7
3
|
interface BaseOptions {
|
|
@@ -17,7 +13,7 @@ declare module 'vm' {
|
|
|
17
13
|
lineOffset?: number;
|
|
18
14
|
/**
|
|
19
15
|
* Specifies the column number offset that is displayed in stack traces produced by this script.
|
|
20
|
-
*
|
|
16
|
+
* @default 0
|
|
21
17
|
*/
|
|
22
18
|
columnOffset?: number;
|
|
23
19
|
}
|
node/wasi.d.ts
CHANGED
node/worker_threads.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
declare module 'node:worker_threads' {
|
|
2
|
-
export * from 'worker_threads';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'worker_threads' {
|
|
6
|
-
import { Context } from '
|
|
7
|
-
import EventEmitter = require('
|
|
8
|
-
import { Readable, Writable } from '
|
|
9
|
-
import { URL } from '
|
|
10
|
-
import { FileHandle } from '
|
|
2
|
+
import { Context } from 'vm';
|
|
3
|
+
import EventEmitter = require('events');
|
|
4
|
+
import { Readable, Writable } from 'stream';
|
|
5
|
+
import { URL } from 'url';
|
|
6
|
+
import { FileHandle } from 'fs/promises';
|
|
7
|
+
import { EventLoopUtilityFunction } from 'perf_hooks';
|
|
11
8
|
|
|
12
9
|
const isMainThread: boolean;
|
|
13
10
|
const parentPort: null | MessagePort;
|
|
@@ -21,6 +18,10 @@ declare module 'worker_threads' {
|
|
|
21
18
|
readonly port2: MessagePort;
|
|
22
19
|
}
|
|
23
20
|
|
|
21
|
+
interface WorkerPerformance {
|
|
22
|
+
eventLoopUtilitzation: EventLoopUtilityFunction;
|
|
23
|
+
}
|
|
24
|
+
|
|
24
25
|
type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
|
|
25
26
|
|
|
26
27
|
class MessagePort extends EventEmitter {
|
|
@@ -123,6 +124,7 @@ declare module 'worker_threads' {
|
|
|
123
124
|
readonly stderr: Readable;
|
|
124
125
|
readonly threadId: number;
|
|
125
126
|
readonly resourceLimits?: ResourceLimits;
|
|
127
|
+
readonly performance: WorkerPerformance;
|
|
126
128
|
|
|
127
129
|
/**
|
|
128
130
|
* @param filename The path to the Worker’s main script or module.
|