@types/node 16.4.14 → 16.7.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 +1 -1
- node/assert.d.ts +1 -531
- node/async_hooks.d.ts +16 -16
- node/base.d.ts +1 -1
- node/buffer.d.ts +398 -41
- node/child_process.d.ts +1 -1
- node/cluster.d.ts +13 -7
- node/console.d.ts +1 -1
- node/crypto.d.ts +71 -882
- node/dgram.d.ts +17 -8
- node/diagnostics_channel.d.ts +24 -7
- node/dns.d.ts +5 -1
- node/domain.d.ts +2 -2
- node/events.d.ts +183 -4
- node/fs/promises.d.ts +36 -20
- node/fs.d.ts +127 -62
- node/globals.d.ts +24 -13
- node/http.d.ts +67 -13
- node/http2.d.ts +1 -1
- node/https.d.ts +1 -1
- node/index.d.ts +1 -1
- node/inspector.d.ts +4 -5
- node/net.d.ts +2 -2
- node/os.d.ts +1 -1
- node/package.json +3 -3
- node/path.d.ts +1 -1
- node/perf_hooks.d.ts +3 -3
- node/process.d.ts +110 -35
- node/punycode.d.ts +2 -3
- node/querystring.d.ts +2 -2
- node/readline.d.ts +1 -1
- node/repl.d.ts +1 -1
- node/stream/web.d.ts +6 -0
- node/stream.d.ts +2 -2
- node/string_decoder.d.ts +1 -1
- node/timers/promises.d.ts +0 -45
- node/timers.d.ts +1 -1
- node/tls.d.ts +4 -4
- node/trace_events.d.ts +1 -1
- node/ts3.6/base.d.ts +2 -1
- node/tty.d.ts +4 -4
- node/url.d.ts +37 -76
- node/util.d.ts +3 -3
- node/v8.d.ts +1 -1
- node/vm.d.ts +2 -2
- node/wasi.d.ts +4 -24
- node/worker_threads.d.ts +1 -1
- node/zlib.d.ts +1 -1
node/child_process.d.ts
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
61
61
|
* the synchronous methods can have significant impact on performance due to
|
|
62
62
|
* stalling the event loop while spawned processes complete.
|
|
63
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
63
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/child_process.js)
|
|
64
64
|
*/
|
|
65
65
|
declare module 'child_process' {
|
|
66
66
|
import { ObjectEncodingOptions } from 'node:fs';
|
node/cluster.d.ts
CHANGED
|
@@ -7,9 +7,12 @@
|
|
|
7
7
|
* server ports.
|
|
8
8
|
*
|
|
9
9
|
* ```js
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* import cluster from 'cluster';
|
|
11
|
+
* import http from 'http';
|
|
12
|
+
* import { cpus } from 'os';
|
|
13
|
+
* import process from 'process';
|
|
14
|
+
*
|
|
15
|
+
* const numCPUs = cpus().length;
|
|
13
16
|
*
|
|
14
17
|
* if (cluster.isPrimary) {
|
|
15
18
|
* console.log(`Primary ${process.pid} is running`);
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
* ```
|
|
47
50
|
*
|
|
48
51
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
49
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
52
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/cluster.js)
|
|
50
53
|
*/
|
|
51
54
|
declare module 'cluster' {
|
|
52
55
|
import * as child from 'node:child_process';
|
|
@@ -215,9 +218,12 @@ declare module 'cluster' {
|
|
|
215
218
|
* because of exiting or being signaled). Otherwise, it returns `false`.
|
|
216
219
|
*
|
|
217
220
|
* ```js
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
+
* import cluster from 'cluster';
|
|
222
|
+
* import http from 'http';
|
|
223
|
+
* import { cpus } from 'os';
|
|
224
|
+
* import process from 'process';
|
|
225
|
+
*
|
|
226
|
+
* const numCPUs = cpus().length;
|
|
221
227
|
*
|
|
222
228
|
* if (cluster.isPrimary) {
|
|
223
229
|
* console.log(`Primary ${process.pid} is running`);
|
node/console.d.ts
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* myConsole.warn(`Danger ${name}! Danger!`);
|
|
54
54
|
* // Prints: Danger Will Robinson! Danger!, to err
|
|
55
55
|
* ```
|
|
56
|
-
* @see [source](https://github.com/nodejs/node/blob/v16.
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v16.7.0/lib/console.js)
|
|
57
57
|
*/
|
|
58
58
|
declare module 'console' {
|
|
59
59
|
import console = require('node:console');
|