@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/module.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
declare module 'node:module' {
|
|
2
|
-
import Module = require('module');
|
|
3
|
-
export = Module;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
declare module 'module' {
|
|
7
|
-
import { URL } from '
|
|
2
|
+
import { URL } from 'url';
|
|
8
3
|
namespace Module {
|
|
9
4
|
/**
|
|
10
5
|
* Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
|
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.0",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -34,11 +34,6 @@
|
|
|
34
34
|
"url": "https://github.com/btoueg",
|
|
35
35
|
"githubUsername": "btoueg"
|
|
36
36
|
},
|
|
37
|
-
{
|
|
38
|
-
"name": "Bruno Scheufler",
|
|
39
|
-
"url": "https://github.com/brunoscheufler",
|
|
40
|
-
"githubUsername": "brunoscheufler"
|
|
41
|
-
},
|
|
42
37
|
{
|
|
43
38
|
"name": "Chigozirim C.",
|
|
44
39
|
"url": "https://github.com/smac89",
|
|
@@ -231,6 +226,6 @@
|
|
|
231
226
|
},
|
|
232
227
|
"scripts": {},
|
|
233
228
|
"dependencies": {},
|
|
234
|
-
"typesPublisherContentHash": "
|
|
229
|
+
"typesPublisherContentHash": "db9f33705bb813befe4fef062f49dad7d922e4feb6d132c446fd94911812a697",
|
|
235
230
|
"typeScriptVersion": "3.5"
|
|
236
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
|
+
}
|