@types/node 16.11.39 → 18.11.2
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 v16.11 → node}/LICENSE +0 -0
- node v16.11/README.md → node/README.md +4 -4
- {node v16.11 → node}/assert/strict.d.ts +0 -0
- node v16.11/assert.d.ts → node/assert.d.ts +7 -8
- node v16.11/async_hooks.d.ts → node/async_hooks.d.ts +8 -4
- node/buffer.d.ts +2258 -0
- node v16.11/child_process.d.ts → node/child_process.d.ts +6 -3
- node v16.11/cluster.d.ts → node/cluster.d.ts +14 -18
- node v16.11/console.d.ts → node/console.d.ts +1 -1
- {node v16.11 → node}/constants.d.ts +0 -0
- node v16.11/crypto.d.ts → node/crypto.d.ts +679 -53
- node v16.11/dgram.d.ts → node/dgram.d.ts +3 -3
- node v16.11/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +2 -1
- node v16.11/dns/promises.d.ts → node/dns/promises.d.ts +10 -8
- node v16.11/dns.d.ts → node/dns.d.ts +16 -11
- node/dom-events.d.ts +126 -0
- node v16.11/domain.d.ts → node/domain.d.ts +3 -2
- node v16.11/events.d.ts → node/events.d.ts +65 -10
- node v16.11/fs/promises.d.ts → node/fs/promises.d.ts +86 -39
- node v16.11/fs.d.ts → node/fs.d.ts +149 -67
- node/globals.d.ts +300 -0
- {node v16.11 → node}/globals.global.d.ts +0 -0
- node v16.11/http.d.ts → node/http.d.ts +305 -77
- node v16.11/http2.d.ts → node/http2.d.ts +38 -5
- node v16.11/https.d.ts → node/https.d.ts +209 -59
- node v16.11/index.d.ts → node/index.d.ts +6 -3
- node v16.11/inspector.d.ts → node/inspector.d.ts +11 -15
- {node v16.11 → node}/module.d.ts +0 -0
- node v16.11/net.d.ts → node/net.d.ts +94 -21
- node v16.11/os.d.ts → node/os.d.ts +15 -4
- node v16.11/package.json → node/package.json +15 -8
- node v16.11/path.d.ts → node/path.d.ts +34 -23
- node v16.11/perf_hooks.d.ts → node/perf_hooks.d.ts +76 -8
- node v16.11/process.d.ts → node/process.d.ts +17 -16
- node v16.11/punycode.d.ts → node/punycode.d.ts +1 -1
- node v16.11/querystring.d.ts → node/querystring.d.ts +4 -4
- node/readline/promises.d.ts +143 -0
- node v16.11/readline.d.ts → node/readline.d.ts +140 -30
- node v16.11/repl.d.ts → node/repl.d.ts +2 -2
- node v16.11/stream/consumers.d.ts → node/stream/consumers.d.ts +2 -14
- {node v16.11 → node}/stream/promises.d.ts +0 -0
- node v16.11/stream/web.d.ts → node/stream/web.d.ts +3 -65
- node v16.11/stream.d.ts → node/stream.d.ts +97 -19
- node v16.11/string_decoder.d.ts → node/string_decoder.d.ts +1 -1
- node/test.d.ts +314 -0
- {node v16.11 → node}/timers/promises.d.ts +0 -0
- node v16.11/timers.d.ts → node/timers.d.ts +1 -1
- node v16.11/tls.d.ts → node/tls.d.ts +32 -23
- node v16.11/trace_events.d.ts → node/trace_events.d.ts +11 -1
- node/ts4.8/assert/strict.d.ts +8 -0
- node/ts4.8/assert.d.ts +911 -0
- node/ts4.8/async_hooks.d.ts +501 -0
- node v16.11/buffer.d.ts → node/ts4.8/buffer.d.ts +46 -19
- node/ts4.8/child_process.d.ts +1369 -0
- node/ts4.8/cluster.d.ts +410 -0
- node/ts4.8/console.d.ts +412 -0
- node/ts4.8/constants.d.ts +18 -0
- node/ts4.8/crypto.d.ts +3964 -0
- node/ts4.8/dgram.d.ts +545 -0
- node/ts4.8/diagnostics_channel.d.ts +153 -0
- node/ts4.8/dns/promises.d.ts +370 -0
- node/ts4.8/dns.d.ts +659 -0
- node/ts4.8/dom-events.d.ts +126 -0
- node/ts4.8/domain.d.ts +170 -0
- node/ts4.8/events.d.ts +678 -0
- node/ts4.8/fs/promises.d.ts +1138 -0
- node/ts4.8/fs.d.ts +3872 -0
- node v16.11/globals.d.ts → node/ts4.8/globals.d.ts +14 -4
- node/ts4.8/globals.global.d.ts +1 -0
- node/ts4.8/http.d.ts +1607 -0
- node/ts4.8/http2.d.ts +2134 -0
- node/ts4.8/https.d.ts +541 -0
- node/ts4.8/index.d.ts +88 -0
- node/ts4.8/inspector.d.ts +2741 -0
- node/ts4.8/module.d.ts +114 -0
- node/ts4.8/net.d.ts +869 -0
- node/ts4.8/os.d.ts +466 -0
- node/ts4.8/path.d.ts +191 -0
- node/ts4.8/perf_hooks.d.ts +625 -0
- node/ts4.8/process.d.ts +1482 -0
- node/ts4.8/punycode.d.ts +117 -0
- node/ts4.8/querystring.d.ts +131 -0
- node/ts4.8/readline/promises.d.ts +143 -0
- node/ts4.8/readline.d.ts +653 -0
- node/ts4.8/repl.d.ts +424 -0
- node/ts4.8/stream/consumers.d.ts +12 -0
- node/ts4.8/stream/promises.d.ts +42 -0
- node/ts4.8/stream/web.d.ts +330 -0
- node/ts4.8/stream.d.ts +1340 -0
- node/ts4.8/string_decoder.d.ts +67 -0
- node/ts4.8/test.d.ts +314 -0
- node/ts4.8/timers/promises.d.ts +68 -0
- node/ts4.8/timers.d.ts +94 -0
- node/ts4.8/tls.d.ts +1028 -0
- node/ts4.8/trace_events.d.ts +171 -0
- node v16.11/tty.d.ts → node/ts4.8/tty.d.ts +4 -2
- node v16.11/url.d.ts → node/ts4.8/url.d.ts +85 -39
- node v16.11/util.d.ts → node/ts4.8/util.d.ts +268 -12
- node v16.11/v8.d.ts → node/ts4.8/v8.d.ts +21 -3
- node v16.11/vm.d.ts → node/ts4.8/vm.d.ts +6 -4
- node v16.11/wasi.d.ts → node/ts4.8/wasi.d.ts +1 -1
- node v16.11/worker_threads.d.ts → node/ts4.8/worker_threads.d.ts +50 -10
- node v16.11/zlib.d.ts → node/ts4.8/zlib.d.ts +1 -1
- node/tty.d.ts +206 -0
- node/url.d.ts +897 -0
- node/util.d.ts +1850 -0
- node/v8.d.ts +396 -0
- node/vm.d.ts +509 -0
- node/wasi.d.ts +158 -0
- node/worker_threads.d.ts +689 -0
- node/zlib.d.ts +517 -0
|
@@ -28,8 +28,11 @@
|
|
|
28
28
|
* identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }`option if the output will not be consumed.
|
|
29
29
|
*
|
|
30
30
|
* The command lookup is performed using the `options.env.PATH` environment
|
|
31
|
-
* variable if
|
|
32
|
-
* used.
|
|
31
|
+
* variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
|
|
32
|
+
* used. If `options.env` is set without `PATH`, lookup on Unix is performed
|
|
33
|
+
* on a default search path search of `/usr/bin:/bin` (see your operating system's
|
|
34
|
+
* manual for execvpe/execvp), on Windows the current processes environment
|
|
35
|
+
* variable `PATH` is used.
|
|
33
36
|
*
|
|
34
37
|
* On Windows, environment variables are case-insensitive. Node.js
|
|
35
38
|
* lexicographically sorts the `env` keys and uses the first one that
|
|
@@ -60,7 +63,7 @@
|
|
|
60
63
|
* For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
|
|
61
64
|
* the synchronous methods can have significant impact on performance due to
|
|
62
65
|
* stalling the event loop while spawned processes complete.
|
|
63
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
66
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/child_process.js)
|
|
64
67
|
*/
|
|
65
68
|
declare module 'child_process' {
|
|
66
69
|
import { ObjectEncodingOptions } from 'node:fs';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Clusters of Node.js processes can be used to run multiple instances of Node.js
|
|
3
|
+
* that can distribute workloads among their application threads. When process
|
|
4
|
+
* isolation is not needed, use the `worker_threads` module instead, which
|
|
5
|
+
* allows running multiple application threads within a single Node.js instance.
|
|
5
6
|
*
|
|
6
7
|
* The cluster module allows easy creation of child processes that all share
|
|
7
8
|
* server ports.
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
* ```
|
|
50
51
|
*
|
|
51
52
|
* On Windows, it is not yet possible to set up a named pipe server in a worker.
|
|
52
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
|
53
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/cluster.js)
|
|
53
54
|
*/
|
|
54
55
|
declare module 'cluster' {
|
|
55
56
|
import * as child from 'node:child_process';
|
|
@@ -99,9 +100,9 @@ declare module 'cluster' {
|
|
|
99
100
|
/**
|
|
100
101
|
* Send a message to a worker or primary, optionally with a handle.
|
|
101
102
|
*
|
|
102
|
-
* In the primary this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
|
|
103
|
+
* In the primary, this sends a message to a specific worker. It is identical to `ChildProcess.send()`.
|
|
103
104
|
*
|
|
104
|
-
* In a worker this sends a message to the primary. It is identical to`process.send()`.
|
|
105
|
+
* In a worker, this sends a message to the primary. It is identical to`process.send()`.
|
|
105
106
|
*
|
|
106
107
|
* This example will echo back all messages from the primary:
|
|
107
108
|
*
|
|
@@ -123,19 +124,13 @@ declare module 'cluster' {
|
|
|
123
124
|
send(message: child.Serializable, sendHandle: child.SendHandle, callback?: (error: Error | null) => void): boolean;
|
|
124
125
|
send(message: child.Serializable, sendHandle: child.SendHandle, options?: child.MessageOptions, callback?: (error: Error | null) => void): boolean;
|
|
125
126
|
/**
|
|
126
|
-
* This function will kill the worker. In the primary, it does this
|
|
127
|
-
*
|
|
128
|
-
* with `signal`. In the worker, it does it by disconnecting the channel,
|
|
129
|
-
* and then exiting with code `0`.
|
|
127
|
+
* This function will kill the worker. In the primary worker, it does this by
|
|
128
|
+
* disconnecting the `worker.process`, and once disconnected, killing with`signal`. In the worker, it does it by killing the process with `signal`.
|
|
130
129
|
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
* if the worker enters an infinite loop, a graceful disconnect will never occur.
|
|
134
|
-
* If the graceful disconnect behavior is not needed, use `worker.process.kill()`.
|
|
130
|
+
* The `kill()` function kills the worker process without waiting for a graceful
|
|
131
|
+
* disconnect, it has the same behavior as `worker.process.kill()`.
|
|
135
132
|
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* This method is aliased as `worker.destroy()` for backward compatibility.
|
|
133
|
+
* This method is aliased as `worker.destroy()` for backwards compatibility.
|
|
139
134
|
*
|
|
140
135
|
* In a worker, `process.kill()` exists, but it is not this function;
|
|
141
136
|
* it is `kill()`.
|
|
@@ -253,7 +248,8 @@ declare module 'cluster' {
|
|
|
253
248
|
*/
|
|
254
249
|
isDead(): boolean;
|
|
255
250
|
/**
|
|
256
|
-
* This property is `true` if the worker exited due to `.
|
|
251
|
+
* This property is `true` if the worker exited due to `.disconnect()`.
|
|
252
|
+
* If the worker exited any other way, it is `false`. If the
|
|
257
253
|
* worker has not exited, it is `undefined`.
|
|
258
254
|
*
|
|
259
255
|
* The boolean `worker.exitedAfterDisconnect` allows distinguishing between
|
|
@@ -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/
|
|
56
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
|
|
57
57
|
*/
|
|
58
58
|
declare module 'console' {
|
|
59
59
|
import console = require('node:console');
|
|
File without changes
|