@types/node 15.0.1 → 15.3.1
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 +1 -1
- 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 -1
- 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 -2
- 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/net.d.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
declare module 'node:net' {
|
|
2
|
-
export * from 'net';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'net' {
|
|
6
|
-
import * as stream from '
|
|
7
|
-
import EventEmitter = require('
|
|
8
|
-
import * as dns from '
|
|
2
|
+
import * as stream from 'stream';
|
|
3
|
+
import EventEmitter = require('events');
|
|
4
|
+
import * as dns from 'dns';
|
|
9
5
|
|
|
10
6
|
type LookupFunction = (
|
|
11
7
|
hostname: string,
|
|
@@ -188,12 +184,14 @@ declare module 'net' {
|
|
|
188
184
|
|
|
189
185
|
interface ServerOpts {
|
|
190
186
|
/**
|
|
191
|
-
* Indicates whether half-opened TCP connections are allowed.
|
|
187
|
+
* Indicates whether half-opened TCP connections are allowed.
|
|
188
|
+
* @default false
|
|
192
189
|
*/
|
|
193
190
|
allowHalfOpen?: boolean;
|
|
194
191
|
|
|
195
192
|
/**
|
|
196
|
-
* Indicates whether the socket should be paused on incoming connections.
|
|
193
|
+
* Indicates whether the socket should be paused on incoming connections.
|
|
194
|
+
* @default false
|
|
197
195
|
*/
|
|
198
196
|
pauseOnConnect?: boolean;
|
|
199
197
|
}
|
node/os.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.3.1",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -226,6 +226,6 @@
|
|
|
226
226
|
},
|
|
227
227
|
"scripts": {},
|
|
228
228
|
"dependencies": {},
|
|
229
|
-
"typesPublisherContentHash": "
|
|
229
|
+
"typesPublisherContentHash": "5487ee1e7936fac57cddce52c08f0af61a7f0067c859eb399f5234be24a3e9f9",
|
|
230
230
|
"typeScriptVersion": "3.5"
|
|
231
231
|
}
|
node/path.d.ts
CHANGED
node/perf_hooks.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare module 'node:perf_hooks' {
|
|
2
|
-
export * from 'perf_hooks';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'perf_hooks' {
|
|
6
|
-
import { AsyncResource } from '
|
|
2
|
+
import { AsyncResource } from 'async_hooks';
|
|
7
3
|
|
|
8
4
|
type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
|
|
9
5
|
|
|
@@ -88,6 +84,12 @@ declare module 'perf_hooks' {
|
|
|
88
84
|
utilization: number;
|
|
89
85
|
}
|
|
90
86
|
|
|
87
|
+
/**
|
|
88
|
+
* @param util1 The result of a previous call to eventLoopUtilization()
|
|
89
|
+
* @param util2 The result of a previous call to eventLoopUtilization() prior to util1
|
|
90
|
+
*/
|
|
91
|
+
type EventLoopUtilityFunction = (util1?: EventLoopUtilization, util2?: EventLoopUtilization) => EventLoopUtilization;
|
|
92
|
+
|
|
91
93
|
interface Performance {
|
|
92
94
|
/**
|
|
93
95
|
* If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
|
|
@@ -148,11 +150,8 @@ declare module 'perf_hooks' {
|
|
|
148
150
|
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
|
|
149
151
|
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
|
|
150
152
|
* No other CPU idle time is taken into consideration.
|
|
151
|
-
*
|
|
152
|
-
* @param util1 The result of a previous call to eventLoopUtilization()
|
|
153
|
-
* @param util2 The result of a previous call to eventLoopUtilization() prior to util1
|
|
154
153
|
*/
|
|
155
|
-
eventLoopUtilization
|
|
154
|
+
eventLoopUtilization: EventLoopUtilityFunction;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
157
|
interface PerformanceObserverEntryList {
|
node/process.d.ts
CHANGED
node/punycode.d.ts
CHANGED
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated since v7.0.0
|
|
3
|
-
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
4
|
-
* In a future major version of Node.js this module will be removed.
|
|
5
|
-
* Users currently depending on the punycode module should switch to using
|
|
6
|
-
* the userland-provided Punycode.js module instead.
|
|
7
|
-
*/
|
|
8
|
-
declare module 'node:punycode' {
|
|
9
|
-
export * from 'punycode';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
1
|
/**
|
|
13
2
|
* @deprecated since v7.0.0
|
|
14
3
|
* The version of the punycode module bundled in Node.js is being deprecated.
|
node/querystring.d.ts
CHANGED
node/readline.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare module 'node:readline' {
|
|
2
|
-
export * from 'readline';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'readline' {
|
|
6
|
-
import EventEmitter = require('
|
|
2
|
+
import EventEmitter = require('events');
|
|
7
3
|
|
|
8
4
|
interface Key {
|
|
9
5
|
sequence?: string;
|
|
@@ -42,6 +38,7 @@ declare module 'readline' {
|
|
|
42
38
|
*/
|
|
43
39
|
protected constructor(options: ReadLineOptions);
|
|
44
40
|
|
|
41
|
+
getPrompt(): string;
|
|
45
42
|
setPrompt(prompt: string): void;
|
|
46
43
|
prompt(preserveCursor?: boolean): void;
|
|
47
44
|
question(query: string, callback: (answer: string) => void): void;
|
node/repl.d.ts
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
declare module 'node:repl' {
|
|
2
|
-
export * from 'repl';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'repl' {
|
|
6
|
-
import { Interface, Completer, AsyncCompleter } from '
|
|
7
|
-
import { Context } from '
|
|
8
|
-
import { InspectOptions } from '
|
|
2
|
+
import { Interface, Completer, AsyncCompleter } from 'readline';
|
|
3
|
+
import { Context } from 'vm';
|
|
4
|
+
import { InspectOptions } from 'util';
|
|
9
5
|
|
|
10
6
|
interface ReplOptions {
|
|
11
7
|
/**
|
|
12
8
|
* The input prompt to display.
|
|
13
|
-
*
|
|
9
|
+
* @default "> "
|
|
14
10
|
*/
|
|
15
11
|
prompt?: string;
|
|
16
12
|
/**
|
|
17
13
|
* The `Readable` stream from which REPL input will be read.
|
|
18
|
-
*
|
|
14
|
+
* @default process.stdin
|
|
19
15
|
*/
|
|
20
16
|
input?: NodeJS.ReadableStream;
|
|
21
17
|
/**
|
|
22
18
|
* The `Writable` stream to which REPL output will be written.
|
|
23
|
-
*
|
|
19
|
+
* @default process.stdout
|
|
24
20
|
*/
|
|
25
21
|
output?: NodeJS.WritableStream;
|
|
26
22
|
/**
|
node/stream/promises.d.ts
CHANGED
node/stream.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
declare module 'node:stream' {
|
|
2
|
-
import Stream = require('stream');
|
|
3
|
-
export = Stream;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
declare module 'stream' {
|
|
7
|
-
import EventEmitter = require('
|
|
8
|
-
import * as streamPromises from "
|
|
2
|
+
import EventEmitter = require('events');
|
|
3
|
+
import * as streamPromises from "stream/promises";
|
|
9
4
|
|
|
10
5
|
class internal extends EventEmitter {
|
|
11
6
|
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
node/string_decoder.d.ts
CHANGED
node/timers/promises.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare module 'node:timers/promises' {
|
|
2
|
-
export * from 'timers/promises';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'timers/promises' {
|
|
6
|
-
import { TimerOptions } from '
|
|
2
|
+
import { TimerOptions } from 'timers';
|
|
7
3
|
|
|
8
4
|
/**
|
|
9
5
|
* Returns a promise that resolves after the specified delay in milliseconds.
|
node/timers.d.ts
CHANGED
node/tls.d.ts
CHANGED
node/trace_events.d.ts
CHANGED
node/ts3.6/assert.d.ts
CHANGED
node/ts3.6/base.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference path="../constants.d.ts" />
|
|
24
24
|
/// <reference path="../crypto.d.ts" />
|
|
25
25
|
/// <reference path="../dgram.d.ts" />
|
|
26
|
+
/// <reference path="../diagnostic_channel.d.ts" />
|
|
26
27
|
/// <reference path="../dns.d.ts" />
|
|
27
28
|
/// <reference path="../dns/promises.d.ts" />
|
|
28
29
|
/// <reference path="../dns/promises.d.ts" />
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
/// <reference path="../tty.d.ts" />
|
|
55
56
|
/// <reference path="../url.d.ts" />
|
|
56
57
|
/// <reference path="../util.d.ts" />
|
|
58
|
+
/// <reference path="../util/types.d.ts" />
|
|
57
59
|
/// <reference path="../v8.d.ts" />
|
|
58
60
|
/// <reference path="../vm.d.ts" />
|
|
59
61
|
/// <reference path="../worker_threads.d.ts" />
|
node/tty.d.ts
CHANGED
node/url.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
declare module 'node:url' {
|
|
2
|
-
export * from 'url';
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
declare module 'url' {
|
|
6
|
-
import { ParsedUrlQuery, ParsedUrlQueryInput } from '
|
|
2
|
+
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
|
|
7
3
|
|
|
8
4
|
// Input to `url.format`
|
|
9
5
|
interface UrlObject {
|
node/util/types.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
declare module 'util/types' {
|
|
2
|
+
function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
|
|
3
|
+
function isArgumentsObject(object: any): object is IArguments;
|
|
4
|
+
function isArrayBuffer(object: any): object is ArrayBuffer;
|
|
5
|
+
function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
|
|
6
|
+
function isAsyncFunction(object: any): boolean;
|
|
7
|
+
function isBigInt64Array(value: any): value is BigInt64Array;
|
|
8
|
+
function isBigUint64Array(value: any): value is BigUint64Array;
|
|
9
|
+
function isBooleanObject(object: any): object is Boolean;
|
|
10
|
+
function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
|
|
11
|
+
function isDataView(object: any): object is DataView;
|
|
12
|
+
function isDate(object: any): object is Date;
|
|
13
|
+
function isExternal(object: any): boolean;
|
|
14
|
+
function isFloat32Array(object: any): object is Float32Array;
|
|
15
|
+
function isFloat64Array(object: any): object is Float64Array;
|
|
16
|
+
function isGeneratorFunction(object: any): object is GeneratorFunction;
|
|
17
|
+
function isGeneratorObject(object: any): object is Generator;
|
|
18
|
+
function isInt8Array(object: any): object is Int8Array;
|
|
19
|
+
function isInt16Array(object: any): object is Int16Array;
|
|
20
|
+
function isInt32Array(object: any): object is Int32Array;
|
|
21
|
+
function isMap<T>(
|
|
22
|
+
object: T | {},
|
|
23
|
+
): object is T extends ReadonlyMap<any, any>
|
|
24
|
+
? unknown extends T
|
|
25
|
+
? never
|
|
26
|
+
: ReadonlyMap<any, any>
|
|
27
|
+
: Map<any, any>;
|
|
28
|
+
function isMapIterator(object: any): boolean;
|
|
29
|
+
function isModuleNamespaceObject(value: any): boolean;
|
|
30
|
+
function isNativeError(object: any): object is Error;
|
|
31
|
+
function isNumberObject(object: any): object is Number;
|
|
32
|
+
function isPromise(object: any): object is Promise<any>;
|
|
33
|
+
function isProxy(object: any): boolean;
|
|
34
|
+
function isRegExp(object: any): object is RegExp;
|
|
35
|
+
function isSet<T>(
|
|
36
|
+
object: T | {},
|
|
37
|
+
): object is T extends ReadonlySet<any>
|
|
38
|
+
? unknown extends T
|
|
39
|
+
? never
|
|
40
|
+
: ReadonlySet<any>
|
|
41
|
+
: Set<any>;
|
|
42
|
+
function isSetIterator(object: any): boolean;
|
|
43
|
+
function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
|
|
44
|
+
function isStringObject(object: any): object is String;
|
|
45
|
+
function isSymbolObject(object: any): object is Symbol;
|
|
46
|
+
function isTypedArray(object: any): object is NodeJS.TypedArray;
|
|
47
|
+
function isUint8Array(object: any): object is Uint8Array;
|
|
48
|
+
function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
|
|
49
|
+
function isUint16Array(object: any): object is Uint16Array;
|
|
50
|
+
function isUint32Array(object: any): object is Uint32Array;
|
|
51
|
+
function isWeakMap(object: any): object is WeakMap<any, any>;
|
|
52
|
+
function isWeakSet(object: any): object is WeakSet<any>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare module 'node:util/types' {
|
|
56
|
+
export * from 'util/types';
|
|
57
|
+
}
|
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;
|