@types/node 16.6.2 → 16.7.3
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 +1 -1
- node/async_hooks.d.ts +1 -1
- node/buffer.d.ts +256 -37
- node/child_process.d.ts +2 -2
- node/cluster.d.ts +1 -1
- node/console.d.ts +1 -1
- node/crypto.d.ts +9 -9
- node/dgram.d.ts +1 -1
- node/diagnostics_channel.d.ts +1 -1
- node/dns.d.ts +5 -1
- node/domain.d.ts +1 -1
- node/events.d.ts +183 -4
- node/fs/promises.d.ts +33 -19
- node/fs.d.ts +120 -50
- node/http.d.ts +5 -5
- node/http2.d.ts +1 -1
- node/https.d.ts +1 -1
- node/index.d.ts +58 -11
- node/inspector.d.ts +1 -1
- node/net.d.ts +2 -2
- node/os.d.ts +1 -1
- node/package.json +3 -10
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +3 -3
- node/punycode.d.ts +1 -1
- node/querystring.d.ts +2 -2
- node/readline.d.ts +1 -1
- node/repl.d.ts +1 -1
- node/stream/web.d.ts +0 -1
- node/stream.d.ts +2 -2
- node/string_decoder.d.ts +1 -1
- node/timers.d.ts +1 -1
- node/tls.d.ts +3 -3
- node/trace_events.d.ts +1 -1
- node/tty.d.ts +1 -1
- node/url.d.ts +37 -2
- node/util.d.ts +3 -3
- node/v8.d.ts +1 -1
- node/vm.d.ts +1 -1
- node/wasi.d.ts +1 -1
- node/worker_threads.d.ts +1 -1
- node/zlib.d.ts +1 -1
- node/base.d.ts +0 -19
- node/ts3.6/assert.d.ts +0 -103
- node/ts3.6/base.d.ts +0 -68
- node/ts3.6/index.d.ts +0 -7
node/perf_hooks.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* performance.measure('A to B', 'A', 'B');
|
|
27
27
|
* });
|
|
28
28
|
* ```
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/perf_hooks.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'perf_hooks' {
|
|
32
32
|
import { AsyncResource } from 'node:async_hooks';
|
|
@@ -375,7 +375,7 @@ declare module 'perf_hooks' {
|
|
|
375
375
|
*/
|
|
376
376
|
disconnect(): void;
|
|
377
377
|
/**
|
|
378
|
-
* Subscribes the
|
|
378
|
+
* Subscribes the `PerformanceObserver` instance to notifications of new `PerformanceEntry` instances identified either by `options.entryTypes`or `options.type`:
|
|
379
379
|
*
|
|
380
380
|
* ```js
|
|
381
381
|
* const {
|
|
@@ -545,7 +545,7 @@ declare module 'perf_hooks' {
|
|
|
545
545
|
figures?: number | undefined;
|
|
546
546
|
}
|
|
547
547
|
/**
|
|
548
|
-
* Returns a
|
|
548
|
+
* Returns a `RecordableHistogram`.
|
|
549
549
|
* @since v15.9.0
|
|
550
550
|
*/
|
|
551
551
|
function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
|
node/punycode.d.ts
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* made available to developers as a convenience. Fixes or other modifications to
|
|
25
25
|
* the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
|
|
26
26
|
* @deprecated Since v7.0.0 - Deprecated
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
27
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/punycode.js)
|
|
28
28
|
*/
|
|
29
29
|
declare module 'punycode' {
|
|
30
30
|
/**
|
node/querystring.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* ```
|
|
8
8
|
*
|
|
9
9
|
* The `querystring` API is considered Legacy. While it is still maintained,
|
|
10
|
-
* new code should use the
|
|
10
|
+
* new code should use the `URLSearchParams` API instead.
|
|
11
11
|
* @deprecated Legacy
|
|
12
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
12
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/querystring.js)
|
|
13
13
|
*/
|
|
14
14
|
declare module 'querystring' {
|
|
15
15
|
interface StringifyOptions {
|
node/readline.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
|
|
28
28
|
* received on the `input` stream.
|
|
29
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
29
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/readline.js)
|
|
30
30
|
*/
|
|
31
31
|
declare module 'readline' {
|
|
32
32
|
import { Abortable, EventEmitter } from 'node:events';
|
node/repl.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const repl = require('repl');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/repl.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'repl' {
|
|
12
12
|
import { Interface, Completer, AsyncCompleter } from 'node:readline';
|
node/stream/web.d.ts
CHANGED
node/stream.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* The `stream` module is useful for creating new types of stream instances. It is
|
|
16
16
|
* usually not necessary to use the `stream` module to consume streams.
|
|
17
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
17
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/stream.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
@@ -1007,7 +1007,7 @@ declare module 'stream' {
|
|
|
1007
1007
|
* ```
|
|
1008
1008
|
*
|
|
1009
1009
|
* The `pipeline` API provides a promise version, which can also
|
|
1010
|
-
* receive an options argument as the last parameter with a`signal`
|
|
1010
|
+
* receive an options argument as the last parameter with a`signal` `AbortSignal` property. When the signal is aborted,`destroy` will be called on the underlying pipeline, with
|
|
1011
1011
|
* an`AbortError`.
|
|
1012
1012
|
*
|
|
1013
1013
|
* ```js
|
node/string_decoder.d.ts
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
37
|
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module 'string_decoder' {
|
|
42
42
|
class StringDecoder {
|
node/timers.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* The timer functions within Node.js implement a similar API as the timers API
|
|
7
7
|
* provided by Web Browsers but use a different internal implementation that is
|
|
8
8
|
* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/timers.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'timers' {
|
|
12
12
|
import { Abortable } from 'node:events';
|
node/tls.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const tls = require('tls');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/tls.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'tls' {
|
|
12
12
|
import { X509Certificate } from 'node:crypto';
|
|
@@ -348,14 +348,14 @@ declare module 'tls' {
|
|
|
348
348
|
*/
|
|
349
349
|
enableTrace(): void;
|
|
350
350
|
/**
|
|
351
|
-
* Returns the peer certificate as an
|
|
351
|
+
* Returns the peer certificate as an `X509Certificate` object.
|
|
352
352
|
*
|
|
353
353
|
* If there is no peer certificate, or the socket has been destroyed,`undefined` will be returned.
|
|
354
354
|
* @since v15.9.0
|
|
355
355
|
*/
|
|
356
356
|
getPeerX509Certificate(): X509Certificate | undefined;
|
|
357
357
|
/**
|
|
358
|
-
* Returns the local certificate as an
|
|
358
|
+
* Returns the local certificate as an `X509Certificate` object.
|
|
359
359
|
*
|
|
360
360
|
* If there is no local certificate, or the socket has been destroyed,`undefined` will be returned.
|
|
361
361
|
* @since v15.9.0
|
node/trace_events.d.ts
CHANGED
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
*
|
|
74
74
|
* The features from this module are not available in `Worker` threads.
|
|
75
75
|
* @experimental
|
|
76
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
76
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/trace_events.js)
|
|
77
77
|
*/
|
|
78
78
|
declare module 'trace_events' {
|
|
79
79
|
/**
|
node/tty.d.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* In most cases, there should be little to no reason for an application to
|
|
24
24
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
|
|
25
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
25
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/tty.js)
|
|
26
26
|
*/
|
|
27
27
|
declare module 'tty' {
|
|
28
28
|
import * as net from 'node:net';
|
node/url.d.ts
CHANGED
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* ```js
|
|
6
6
|
* import url from 'url';
|
|
7
7
|
* ```
|
|
8
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
8
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/url.js)
|
|
9
9
|
*/
|
|
10
10
|
declare module 'url' {
|
|
11
|
+
import { Blob } from 'node:buffer';
|
|
11
12
|
import { ClientRequestArgs } from 'node:http';
|
|
12
13
|
import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
|
|
13
14
|
// Input to `url.format`
|
|
@@ -263,7 +264,7 @@ declare module 'url' {
|
|
|
263
264
|
* import { urlToHttpOptions } from 'url';
|
|
264
265
|
* const myURL = new URL('https://a:b@測試?abc#foo');
|
|
265
266
|
*
|
|
266
|
-
* console.log(urlToHttpOptions(
|
|
267
|
+
* console.log(urlToHttpOptions(myURL));
|
|
267
268
|
*
|
|
268
269
|
* {
|
|
269
270
|
* protocol: 'https:',
|
|
@@ -301,6 +302,40 @@ declare module 'url' {
|
|
|
301
302
|
* @since v7.0.0, v6.13.0
|
|
302
303
|
*/
|
|
303
304
|
class URL {
|
|
305
|
+
/**
|
|
306
|
+
* Creates a `'blob:nodedata:...'` URL string that represents the given `Blob` object and can be used to retrieve the `Blob` later.
|
|
307
|
+
*
|
|
308
|
+
* ```js
|
|
309
|
+
* const {
|
|
310
|
+
* Blob,
|
|
311
|
+
* resolveObjectURL,
|
|
312
|
+
* } = require('buffer');
|
|
313
|
+
*
|
|
314
|
+
* const blob = new Blob(['hello']);
|
|
315
|
+
* const id = URL.createObjectURL(blob);
|
|
316
|
+
*
|
|
317
|
+
* // later...
|
|
318
|
+
*
|
|
319
|
+
* const otherBlob = resolveObjectURL(id);
|
|
320
|
+
* console.log(otherBlob.size);
|
|
321
|
+
* ```
|
|
322
|
+
*
|
|
323
|
+
* The data stored by the registered `Blob` will be retained in memory until`URL.revokeObjectURL()` is called to remove it.
|
|
324
|
+
*
|
|
325
|
+
* `Blob` objects are registered within the current thread. If using Worker
|
|
326
|
+
* Threads, `Blob` objects registered within one Worker will not be available
|
|
327
|
+
* to other workers or the main thread.
|
|
328
|
+
* @since v16.7.0
|
|
329
|
+
* @experimental
|
|
330
|
+
*/
|
|
331
|
+
static createObjectURL(blob: Blob): string;
|
|
332
|
+
/**
|
|
333
|
+
* Removes the stored `Blob` identified by the given ID.
|
|
334
|
+
* @since v16.7.0
|
|
335
|
+
* @experimental
|
|
336
|
+
* @param id A `'blob:nodedata:...` URL string returned by a prior call to `URL.createObjectURL()`.
|
|
337
|
+
*/
|
|
338
|
+
static revokeObjectURL(objectUrl: string): void;
|
|
304
339
|
constructor(input: string, base?: string | URL);
|
|
305
340
|
/**
|
|
306
341
|
* Gets and sets the fragment portion of the URL.
|
node/util.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* ```js
|
|
7
7
|
* const util = require('util');
|
|
8
8
|
* ```
|
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/util.js)
|
|
10
10
|
*/
|
|
11
11
|
declare module 'util' {
|
|
12
12
|
import * as types from 'node:util/types';
|
|
@@ -1538,12 +1538,12 @@ declare module 'util/types' {
|
|
|
1538
1538
|
*/
|
|
1539
1539
|
function isWeakSet(object: unknown): object is WeakSet<object>;
|
|
1540
1540
|
/**
|
|
1541
|
-
* Returns `true` if `value` is a
|
|
1541
|
+
* Returns `true` if `value` is a `KeyObject`, `false` otherwise.
|
|
1542
1542
|
* @since v16.2.0
|
|
1543
1543
|
*/
|
|
1544
1544
|
function isKeyObject(object: unknown): object is KeyObject;
|
|
1545
1545
|
/**
|
|
1546
|
-
* Returns `true` if `value` is a
|
|
1546
|
+
* Returns `true` if `value` is a `CryptoKey`, `false` otherwise.
|
|
1547
1547
|
* @since v16.2.0
|
|
1548
1548
|
*/
|
|
1549
1549
|
function isCryptoKey(object: unknown): object is webcrypto.CryptoKey;
|
node/v8.d.ts
CHANGED
node/vm.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*
|
|
33
33
|
* console.log(x); // 1; y is not defined.
|
|
34
34
|
* ```
|
|
35
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
35
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/vm.js)
|
|
36
36
|
*/
|
|
37
37
|
declare module 'vm' {
|
|
38
38
|
interface Context extends NodeJS.Dict<any> {}
|
node/wasi.d.ts
CHANGED
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
* The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
|
|
64
64
|
* example to run.
|
|
65
65
|
* @experimental
|
|
66
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
66
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/wasi.js)
|
|
67
67
|
*/
|
|
68
68
|
declare module 'wasi' {
|
|
69
69
|
interface WASIOptions {
|
node/worker_threads.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
*
|
|
50
50
|
* Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
|
|
51
51
|
* specifically `argv` and `execArgv` options.
|
|
52
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
52
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/worker_threads.js)
|
|
53
53
|
*/
|
|
54
54
|
declare module 'worker_threads' {
|
|
55
55
|
import { Blob } from 'node:buffer';
|
node/zlib.d.ts
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
* });
|
|
89
89
|
* ```
|
|
90
90
|
* @since v0.5.8
|
|
91
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
91
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/zlib.js)
|
|
92
92
|
*/
|
|
93
93
|
declare module 'zlib' {
|
|
94
94
|
import * as stream from 'node:stream';
|
node/base.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.7.
|
|
2
|
-
|
|
3
|
-
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
-
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
-
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
|
|
6
|
-
// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
|
|
7
|
-
// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
|
|
8
|
-
|
|
9
|
-
// Reference required types from the default lib:
|
|
10
|
-
/// <reference lib="es2020" />
|
|
11
|
-
/// <reference lib="esnext.asynciterable" />
|
|
12
|
-
/// <reference lib="esnext.intl" />
|
|
13
|
-
/// <reference lib="esnext.bigint" />
|
|
14
|
-
|
|
15
|
-
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
/// <reference path="ts3.6/base.d.ts" />
|
|
17
|
-
|
|
18
|
-
// TypeScript 3.7-specific augmentations:
|
|
19
|
-
/// <reference path="assert.d.ts" />
|
node/ts3.6/assert.d.ts
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
declare module 'assert' {
|
|
2
|
-
/** An alias of `assert.ok()`. */
|
|
3
|
-
function assert(value: unknown, message?: string | Error): void;
|
|
4
|
-
namespace assert {
|
|
5
|
-
class AssertionError extends Error {
|
|
6
|
-
actual: unknown;
|
|
7
|
-
expected: unknown;
|
|
8
|
-
operator: string;
|
|
9
|
-
generatedMessage: boolean;
|
|
10
|
-
code: 'ERR_ASSERTION';
|
|
11
|
-
|
|
12
|
-
constructor(options?: {
|
|
13
|
-
/** If provided, the error message is set to this value. */
|
|
14
|
-
message?: string;
|
|
15
|
-
/** The `actual` property on the error instance. */
|
|
16
|
-
actual?: unknown;
|
|
17
|
-
/** The `expected` property on the error instance. */
|
|
18
|
-
expected?: unknown;
|
|
19
|
-
/** The `operator` property on the error instance. */
|
|
20
|
-
operator?: string;
|
|
21
|
-
/** If provided, the generated stack trace omits frames before this function. */
|
|
22
|
-
// tslint:disable-next-line:ban-types
|
|
23
|
-
stackStartFn?: Function;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
class CallTracker {
|
|
28
|
-
calls(exact?: number): () => void;
|
|
29
|
-
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
|
|
30
|
-
report(): CallTrackerReportInformation[];
|
|
31
|
-
verify(): void;
|
|
32
|
-
}
|
|
33
|
-
interface CallTrackerReportInformation {
|
|
34
|
-
message: string;
|
|
35
|
-
/** The actual number of times the function was called. */
|
|
36
|
-
actual: number;
|
|
37
|
-
/** The number of times the function was expected to be called. */
|
|
38
|
-
expected: number;
|
|
39
|
-
/** The name of the function that is wrapped. */
|
|
40
|
-
operator: string;
|
|
41
|
-
/** A stack trace of the function. */
|
|
42
|
-
stack: object;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
type AssertPredicate = RegExp | (new () => object) | ((thrown: unknown) => boolean) | object | Error;
|
|
46
|
-
|
|
47
|
-
function fail(message?: string | Error): never;
|
|
48
|
-
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
49
|
-
function fail(
|
|
50
|
-
actual: unknown,
|
|
51
|
-
expected: unknown,
|
|
52
|
-
message?: string | Error,
|
|
53
|
-
operator?: string,
|
|
54
|
-
// tslint:disable-next-line:ban-types
|
|
55
|
-
stackStartFn?: Function,
|
|
56
|
-
): never;
|
|
57
|
-
function ok(value: unknown, message?: string | Error): void;
|
|
58
|
-
/** @deprecated since v9.9.0 - use strictEqual() instead. */
|
|
59
|
-
function equal(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
60
|
-
/** @deprecated since v9.9.0 - use notStrictEqual() instead. */
|
|
61
|
-
function notEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
62
|
-
/** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
|
|
63
|
-
function deepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
64
|
-
/** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
|
|
65
|
-
function notDeepEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
66
|
-
function strictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
67
|
-
function notStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
68
|
-
function deepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
69
|
-
function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string | Error): void;
|
|
70
|
-
|
|
71
|
-
function throws(block: () => unknown, message?: string | Error): void;
|
|
72
|
-
function throws(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
|
|
73
|
-
function doesNotThrow(block: () => unknown, message?: string | Error): void;
|
|
74
|
-
function doesNotThrow(block: () => unknown, error: AssertPredicate, message?: string | Error): void;
|
|
75
|
-
|
|
76
|
-
function ifError(value: unknown): void;
|
|
77
|
-
|
|
78
|
-
function rejects(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
|
|
79
|
-
function rejects(
|
|
80
|
-
block: (() => Promise<unknown>) | Promise<unknown>,
|
|
81
|
-
error: AssertPredicate,
|
|
82
|
-
message?: string | Error,
|
|
83
|
-
): Promise<void>;
|
|
84
|
-
function doesNotReject(block: (() => Promise<unknown>) | Promise<unknown>, message?: string | Error): Promise<void>;
|
|
85
|
-
function doesNotReject(
|
|
86
|
-
block: (() => Promise<unknown>) | Promise<unknown>,
|
|
87
|
-
error: AssertPredicate,
|
|
88
|
-
message?: string | Error,
|
|
89
|
-
): Promise<void>;
|
|
90
|
-
|
|
91
|
-
function match(value: string, regExp: RegExp, message?: string | Error): void;
|
|
92
|
-
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
|
|
93
|
-
|
|
94
|
-
const strict: typeof assert;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export = assert;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
declare module 'node:assert' {
|
|
101
|
-
import assert = require('assert');
|
|
102
|
-
export = assert;
|
|
103
|
-
}
|
node/ts3.6/base.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.6 and earlier.
|
|
2
|
-
|
|
3
|
-
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
-
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
-
// - ~/index.d.ts - Definitions specific to TypeScript 3.7 and above
|
|
6
|
-
// - ~/ts3.6/base.d.ts - Definitions specific to TypeScript 3.6 and earlier
|
|
7
|
-
// - ~/ts3.6/index.d.ts - Definitions specific to TypeScript 3.6 and earlier with assert pulled in
|
|
8
|
-
|
|
9
|
-
// Reference required types from the default lib:
|
|
10
|
-
/// <reference lib="es2020" />
|
|
11
|
-
/// <reference lib="esnext.asynciterable" />
|
|
12
|
-
/// <reference lib="esnext.intl" />
|
|
13
|
-
/// <reference lib="esnext.bigint" />
|
|
14
|
-
|
|
15
|
-
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
/// <reference path="../assert/strict.d.ts" />
|
|
17
|
-
/// <reference path="../globals.d.ts" />
|
|
18
|
-
/// <reference path="../async_hooks.d.ts" />
|
|
19
|
-
/// <reference path="../buffer.d.ts" />
|
|
20
|
-
/// <reference path="../child_process.d.ts" />
|
|
21
|
-
/// <reference path="../cluster.d.ts" />
|
|
22
|
-
/// <reference path="../console.d.ts" />
|
|
23
|
-
/// <reference path="../constants.d.ts" />
|
|
24
|
-
/// <reference path="../crypto.d.ts" />
|
|
25
|
-
/// <reference path="../dgram.d.ts" />
|
|
26
|
-
/// <reference path="../diagnostics_channel.d.ts" />
|
|
27
|
-
/// <reference path="../dns.d.ts" />
|
|
28
|
-
/// <reference path="../dns/promises.d.ts" />
|
|
29
|
-
/// <reference path="../dns/promises.d.ts" />
|
|
30
|
-
/// <reference path="../domain.d.ts" />
|
|
31
|
-
/// <reference path="../events.d.ts" />
|
|
32
|
-
/// <reference path="../fs.d.ts" />
|
|
33
|
-
/// <reference path="../fs/promises.d.ts" />
|
|
34
|
-
/// <reference path="../http.d.ts" />
|
|
35
|
-
/// <reference path="../http2.d.ts" />
|
|
36
|
-
/// <reference path="../https.d.ts" />
|
|
37
|
-
/// <reference path="../inspector.d.ts" />
|
|
38
|
-
/// <reference path="../module.d.ts" />
|
|
39
|
-
/// <reference path="../net.d.ts" />
|
|
40
|
-
/// <reference path="../os.d.ts" />
|
|
41
|
-
/// <reference path="../path.d.ts" />
|
|
42
|
-
/// <reference path="../perf_hooks.d.ts" />
|
|
43
|
-
/// <reference path="../process.d.ts" />
|
|
44
|
-
/// <reference path="../punycode.d.ts" />
|
|
45
|
-
/// <reference path="../querystring.d.ts" />
|
|
46
|
-
/// <reference path="../readline.d.ts" />
|
|
47
|
-
/// <reference path="../repl.d.ts" />
|
|
48
|
-
/// <reference path="../stream.d.ts" />
|
|
49
|
-
/// <reference path="../stream/promises.d.ts" />
|
|
50
|
-
/// <reference path="../stream/web.d.ts" />
|
|
51
|
-
/// <reference path="../string_decoder.d.ts" />
|
|
52
|
-
/// <reference path="../timers.d.ts" />
|
|
53
|
-
/// <reference path="../timers/promises.d.ts" />
|
|
54
|
-
/// <reference path="../tls.d.ts" />
|
|
55
|
-
/// <reference path="../trace_events.d.ts" />
|
|
56
|
-
/// <reference path="../tty.d.ts" />
|
|
57
|
-
/// <reference path="../url.d.ts" />
|
|
58
|
-
/// <reference path="../util.d.ts" />
|
|
59
|
-
/// <reference path="../v8.d.ts" />
|
|
60
|
-
/// <reference path="../vm.d.ts" />
|
|
61
|
-
/// <reference path="../worker_threads.d.ts" />
|
|
62
|
-
/// <reference path="../zlib.d.ts" />
|
|
63
|
-
|
|
64
|
-
// TypeScript 3.6-specific augmentations:
|
|
65
|
-
/// <reference path="../globals.global.d.ts" />
|
|
66
|
-
|
|
67
|
-
// TypeScript 3.6-specific augmentations:
|
|
68
|
-
/// <reference path="../wasi.d.ts" />
|
node/ts3.6/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.6.
|
|
2
|
-
// This is required to enable typing assert in ts3.7 without causing errors
|
|
3
|
-
// Typically type modifications should be made in base.d.ts instead of here
|
|
4
|
-
|
|
5
|
-
/// <reference path="base.d.ts" />
|
|
6
|
-
|
|
7
|
-
/// <reference path="assert.d.ts" />
|