@types/node 22.16.0 → 24.0.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 v22.16/README.md → node/README.md +2 -2
- node v22.16/assert.d.ts → node/assert.d.ts +5 -5
- node v22.16/async_hooks.d.ts → node/async_hooks.d.ts +25 -5
- node v22.16/buffer.d.ts → node/buffer.d.ts +1 -4
- node v22.16/child_process.d.ts → node/child_process.d.ts +2 -2
- node v22.16/cluster.d.ts → node/cluster.d.ts +15 -15
- node v22.16/compatibility/iterators.d.ts → node/compatibility/iterators.d.ts +1 -0
- node v22.16/console.d.ts → node/console.d.ts +17 -17
- node v22.16/crypto.d.ts → node/crypto.d.ts +35 -28
- node v22.16/dgram.d.ts → node/dgram.d.ts +1 -1
- node v22.16/diagnostics_channel.d.ts → node/diagnostics_channel.d.ts +1 -1
- node v22.16/dns/promises.d.ts → node/dns/promises.d.ts +1 -27
- node v22.16/dns.d.ts → node/dns.d.ts +18 -72
- node v22.16/domain.d.ts → node/domain.d.ts +1 -1
- node v22.16/events.d.ts → node/events.d.ts +1 -1
- node v22.16/fs/promises.d.ts → node/fs/promises.d.ts +18 -12
- node v22.16/fs.d.ts → node/fs.d.ts +29 -20
- node v22.16/globals.d.ts → node/globals.d.ts +7 -4
- node v22.16/globals.typedarray.d.ts → node/globals.typedarray.d.ts +1 -0
- node v22.16/http.d.ts → node/http.d.ts +3 -80
- node v22.16/http2.d.ts → node/http2.d.ts +6 -3
- node v22.16/https.d.ts → node/https.d.ts +1 -1
- node v22.16/index.d.ts → node/index.d.ts +7 -5
- node v22.16/inspector.d.ts → node/inspector.d.ts +3 -7
- node v22.16/module.d.ts → node/module.d.ts +18 -63
- node v22.16/net.d.ts → node/net.d.ts +2 -5
- node v22.16/os.d.ts → node/os.d.ts +8 -7
- node v22.16/package.json → node/package.json +13 -3
- node v22.16/path.d.ts → node/path.d.ts +1 -1
- node v22.16/perf_hooks.d.ts → node/perf_hooks.d.ts +8 -8
- node v22.16/process.d.ts → node/process.d.ts +21 -9
- node v22.16/punycode.d.ts → node/punycode.d.ts +1 -1
- node v22.16/querystring.d.ts → node/querystring.d.ts +1 -1
- node v22.16/readline/promises.d.ts → node/readline/promises.d.ts +0 -1
- node v22.16/readline.d.ts → node/readline.d.ts +13 -13
- node v22.16/repl.d.ts → node/repl.d.ts +12 -12
- node v22.16/sea.d.ts → node/sea.d.ts +1 -1
- node v22.16/sqlite.d.ts → node/sqlite.d.ts +15 -7
- node v22.16/stream/web.d.ts → node/stream/web.d.ts +0 -4
- node v22.16/stream.d.ts → node/stream.d.ts +8 -19
- node v22.16/string_decoder.d.ts → node/string_decoder.d.ts +1 -1
- node/test.d.ts +2318 -0
- node v22.16/timers/promises.d.ts → node/timers/promises.d.ts +1 -1
- node v22.16/timers.d.ts → node/timers.d.ts +1 -1
- node v22.16/tls.d.ts → node/tls.d.ts +2 -48
- node v22.16/trace_events.d.ts → node/trace_events.d.ts +6 -6
- node v22.16/compatibility/disposable.d.ts → node/ts5.1/compatibility/disposable.d.ts +0 -2
- node/ts5.1/index.d.ts +98 -0
- node/ts5.6/compatibility/float16array.d.ts +71 -0
- node v22.16/ts5.6/globals.typedarray.d.ts → node/ts5.6/globals.typedarray.d.ts +1 -0
- node v22.16/ts5.6/index.d.ts → node/ts5.6/index.d.ts +9 -5
- node/ts5.7/compatibility/float16array.d.ts +72 -0
- node/ts5.7/index.d.ts +96 -0
- node v22.16/tty.d.ts → node/tty.d.ts +1 -1
- node v22.16/url.d.ts → node/url.d.ts +61 -19
- node v22.16/util.d.ts → node/util.d.ts +7 -298
- node v22.16/v8.d.ts → node/v8.d.ts +29 -65
- node v22.16/vm.d.ts → node/vm.d.ts +17 -10
- node v22.16/wasi.d.ts → node/wasi.d.ts +1 -1
- node v22.16/worker_threads.d.ts → node/worker_threads.d.ts +8 -2
- node v22.16/zlib.d.ts → node/zlib.d.ts +5 -7
- node v22.16/compatibility/index.d.ts +0 -9
- node v22.16/compatibility/indexable.d.ts +0 -20
- node v22.16/test.d.ts +0 -2175
- {node v22.16 → node}/LICENSE +0 -0
- {node v22.16 → node}/assert/strict.d.ts +0 -0
- {node v22.16 → node}/buffer.buffer.d.ts +0 -0
- {node v22.16 → node}/constants.d.ts +0 -0
- {node v22.16 → node}/dom-events.d.ts +0 -0
- {node v22.16 → node}/stream/consumers.d.ts +0 -0
- {node v22.16 → node}/stream/promises.d.ts +0 -0
- {node v22.16 → node}/ts5.6/buffer.buffer.d.ts +0 -0
@@ -11,7 +11,7 @@
|
|
11
11
|
* } from 'node:timers/promises';
|
12
12
|
* ```
|
13
13
|
* @since v15.0.0
|
14
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
14
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers/promises.js)
|
15
15
|
*/
|
16
16
|
declare module "timers/promises" {
|
17
17
|
import { TimerOptions } from "node:timers";
|
@@ -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/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/timers.js)
|
10
10
|
*/
|
11
11
|
declare module "timers" {
|
12
12
|
import { Abortable } from "node:events";
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* ```js
|
7
7
|
* import tls from 'node:tls';
|
8
8
|
* ```
|
9
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
9
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tls.js)
|
10
10
|
*/
|
11
11
|
declare module "tls" {
|
12
12
|
import { X509Certificate } from "node:crypto";
|
@@ -797,13 +797,6 @@ declare module "tls" {
|
|
797
797
|
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
798
798
|
prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
799
799
|
}
|
800
|
-
/**
|
801
|
-
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
|
802
|
-
*/
|
803
|
-
interface SecurePair {
|
804
|
-
encrypted: TLSSocket;
|
805
|
-
cleartext: TLSSocket;
|
806
|
-
}
|
807
800
|
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";
|
808
801
|
interface SecureContextOptions {
|
809
802
|
/**
|
@@ -1102,45 +1095,6 @@ declare module "tls" {
|
|
1102
1095
|
secureConnectListener?: () => void,
|
1103
1096
|
): TLSSocket;
|
1104
1097
|
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
1105
|
-
/**
|
1106
|
-
* Creates a new secure pair object with two streams, one of which reads and writes
|
1107
|
-
* the encrypted data and the other of which reads and writes the cleartext data.
|
1108
|
-
* Generally, the encrypted stream is piped to/from an incoming encrypted data
|
1109
|
-
* stream and the cleartext one is used as a replacement for the initial encrypted
|
1110
|
-
* stream.
|
1111
|
-
*
|
1112
|
-
* `tls.createSecurePair()` returns a `tls.SecurePair` object with `cleartext` and `encrypted` stream properties.
|
1113
|
-
*
|
1114
|
-
* Using `cleartext` has the same API as {@link TLSSocket}.
|
1115
|
-
*
|
1116
|
-
* The `tls.createSecurePair()` method is now deprecated in favor of`tls.TLSSocket()`. For example, the code:
|
1117
|
-
*
|
1118
|
-
* ```js
|
1119
|
-
* pair = tls.createSecurePair(// ... );
|
1120
|
-
* pair.encrypted.pipe(socket);
|
1121
|
-
* socket.pipe(pair.encrypted);
|
1122
|
-
* ```
|
1123
|
-
*
|
1124
|
-
* can be replaced by:
|
1125
|
-
*
|
1126
|
-
* ```js
|
1127
|
-
* secureSocket = tls.TLSSocket(socket, options);
|
1128
|
-
* ```
|
1129
|
-
*
|
1130
|
-
* where `secureSocket` has the same API as `pair.cleartext`.
|
1131
|
-
* @since v0.3.2
|
1132
|
-
* @deprecated Since v0.11.3 - Use {@link TLSSocket} instead.
|
1133
|
-
* @param context A secure context object as returned by `tls.createSecureContext()`
|
1134
|
-
* @param isServer `true` to specify that this TLS connection should be opened as a server.
|
1135
|
-
* @param requestCert `true` to specify whether a server should request a certificate from a connecting client. Only applies when `isServer` is `true`.
|
1136
|
-
* @param rejectUnauthorized If not `false` a server automatically reject clients with invalid certificates. Only applies when `isServer` is `true`.
|
1137
|
-
*/
|
1138
|
-
function createSecurePair(
|
1139
|
-
context?: SecureContext,
|
1140
|
-
isServer?: boolean,
|
1141
|
-
requestCert?: boolean,
|
1142
|
-
rejectUnauthorized?: boolean,
|
1143
|
-
): SecurePair;
|
1144
1098
|
/**
|
1145
1099
|
* `{@link createServer}` sets the default value of the `honorCipherOrder` option
|
1146
1100
|
* to `true`, other APIs that create secure contexts leave it unset.
|
@@ -1197,7 +1151,7 @@ declare module "tls" {
|
|
1197
1151
|
* the `ciphers` option of `{@link createSecureContext}`.
|
1198
1152
|
*
|
1199
1153
|
* Not all supported ciphers are enabled by default. See
|
1200
|
-
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-
|
1154
|
+
* [Modifying the default TLS cipher suite](https://nodejs.org/docs/latest-v24.x/api/tls.html#modifying-the-default-tls-cipher-suite).
|
1201
1155
|
*
|
1202
1156
|
* Cipher names that start with `'tls_'` are for TLSv1.3, all the others are for
|
1203
1157
|
* TLSv1.2 and below.
|
@@ -9,8 +9,8 @@
|
|
9
9
|
* The available categories are:
|
10
10
|
*
|
11
11
|
* * `node`: An empty placeholder.
|
12
|
-
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-
|
13
|
-
* The [`async_hooks`](https://nodejs.org/docs/latest-
|
12
|
+
* * `node.async_hooks`: Enables capture of detailed [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) trace data.
|
13
|
+
* The [`async_hooks`](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html) events have a unique `asyncId` and a special `triggerId` `triggerAsyncId` property.
|
14
14
|
* * `node.bootstrap`: Enables capture of Node.js bootstrap milestones.
|
15
15
|
* * `node.console`: Enables capture of `console.time()` and `console.count()` output.
|
16
16
|
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
|
@@ -22,7 +22,7 @@
|
|
22
22
|
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync directory methods.
|
23
23
|
* * `node.fs.async`: Enables capture of trace data for file system async methods.
|
24
24
|
* * `node.fs_dir.async`: Enables capture of trace data for file system async directory methods.
|
25
|
-
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-
|
25
|
+
* * `node.perf`: Enables capture of [Performance API](https://nodejs.org/docs/latest-v24.x/api/perf_hooks.html) measurements.
|
26
26
|
* * `node.perf.usertiming`: Enables capture of only Performance API User Timing
|
27
27
|
* measures and marks.
|
28
28
|
* * `node.perf.timerify`: Enables capture of only Performance API timerify
|
@@ -30,7 +30,7 @@
|
|
30
30
|
* * `node.promises.rejections`: Enables capture of trace data tracking the number
|
31
31
|
* of unhandled Promise rejections and handled-after-rejections.
|
32
32
|
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's `runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
|
33
|
-
* * `v8`: The [V8](https://nodejs.org/docs/latest-
|
33
|
+
* * `v8`: The [V8](https://nodejs.org/docs/latest-v24.x/api/v8.html) events are GC, compiling, and execution related.
|
34
34
|
* * `node.http`: Enables capture of trace data for http request / response.
|
35
35
|
*
|
36
36
|
* By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
|
@@ -88,9 +88,9 @@
|
|
88
88
|
* However the trace-event timestamps are expressed in microseconds,
|
89
89
|
* unlike `process.hrtime()` which returns nanoseconds.
|
90
90
|
*
|
91
|
-
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-
|
91
|
+
* The features from this module are not available in [`Worker`](https://nodejs.org/docs/latest-v24.x/api/worker_threads.html#class-worker) threads.
|
92
92
|
* @experimental
|
93
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
93
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/trace_events.js)
|
94
94
|
*/
|
95
95
|
declare module "trace_events" {
|
96
96
|
/**
|
node/ts5.1/index.d.ts
ADDED
@@ -0,0 +1,98 @@
|
|
1
|
+
/**
|
2
|
+
* License for programmatically and manually incorporated
|
3
|
+
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
|
4
|
+
*
|
5
|
+
* Copyright Node.js contributors. All rights reserved.
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to
|
8
|
+
* deal in the Software without restriction, including without limitation the
|
9
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22
|
+
* IN THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
|
25
|
+
// NOTE: These definitions support Node.js and TypeScript 5.1.
|
26
|
+
|
27
|
+
// Reference required TypeScript libraries:
|
28
|
+
/// <reference lib="es2020" />
|
29
|
+
|
30
|
+
// TypeScript library polyfills required for TypeScript <=5.1:
|
31
|
+
/// <reference path="./compatibility/disposable.d.ts" />
|
32
|
+
|
33
|
+
// TypeScript library polyfills required for TypeScript <=5.6:
|
34
|
+
/// <reference path="../ts5.6/compatibility/float16array.d.ts" />
|
35
|
+
|
36
|
+
// Iterator definitions required for compatibility with TypeScript <5.6:
|
37
|
+
/// <reference path="../compatibility/iterators.d.ts" />
|
38
|
+
|
39
|
+
// Definitions for Node.js modules specific to TypeScript <=5.6:
|
40
|
+
/// <reference path="../ts5.6/globals.typedarray.d.ts" />
|
41
|
+
/// <reference path="../ts5.6/buffer.buffer.d.ts" />
|
42
|
+
|
43
|
+
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
44
|
+
/// <reference path="../globals.d.ts" />
|
45
|
+
/// <reference path="../assert.d.ts" />
|
46
|
+
/// <reference path="../assert/strict.d.ts" />
|
47
|
+
/// <reference path="../async_hooks.d.ts" />
|
48
|
+
/// <reference path="../buffer.d.ts" />
|
49
|
+
/// <reference path="../child_process.d.ts" />
|
50
|
+
/// <reference path="../cluster.d.ts" />
|
51
|
+
/// <reference path="../console.d.ts" />
|
52
|
+
/// <reference path="../constants.d.ts" />
|
53
|
+
/// <reference path="../crypto.d.ts" />
|
54
|
+
/// <reference path="../dgram.d.ts" />
|
55
|
+
/// <reference path="../diagnostics_channel.d.ts" />
|
56
|
+
/// <reference path="../dns.d.ts" />
|
57
|
+
/// <reference path="../dns/promises.d.ts" />
|
58
|
+
/// <reference path="../dns/promises.d.ts" />
|
59
|
+
/// <reference path="../domain.d.ts" />
|
60
|
+
/// <reference path="../dom-events.d.ts" />
|
61
|
+
/// <reference path="../events.d.ts" />
|
62
|
+
/// <reference path="../fs.d.ts" />
|
63
|
+
/// <reference path="../fs/promises.d.ts" />
|
64
|
+
/// <reference path="../http.d.ts" />
|
65
|
+
/// <reference path="../http2.d.ts" />
|
66
|
+
/// <reference path="../https.d.ts" />
|
67
|
+
/// <reference path="../inspector.d.ts" />
|
68
|
+
/// <reference path="../module.d.ts" />
|
69
|
+
/// <reference path="../net.d.ts" />
|
70
|
+
/// <reference path="../os.d.ts" />
|
71
|
+
/// <reference path="../path.d.ts" />
|
72
|
+
/// <reference path="../perf_hooks.d.ts" />
|
73
|
+
/// <reference path="../process.d.ts" />
|
74
|
+
/// <reference path="../punycode.d.ts" />
|
75
|
+
/// <reference path="../querystring.d.ts" />
|
76
|
+
/// <reference path="../readline.d.ts" />
|
77
|
+
/// <reference path="../readline/promises.d.ts" />
|
78
|
+
/// <reference path="../repl.d.ts" />
|
79
|
+
/// <reference path="../sea.d.ts" />
|
80
|
+
/// <reference path="../sqlite.d.ts" />
|
81
|
+
/// <reference path="../stream.d.ts" />
|
82
|
+
/// <reference path="../stream/promises.d.ts" />
|
83
|
+
/// <reference path="../stream/consumers.d.ts" />
|
84
|
+
/// <reference path="../stream/web.d.ts" />
|
85
|
+
/// <reference path="../string_decoder.d.ts" />
|
86
|
+
/// <reference path="../test.d.ts" />
|
87
|
+
/// <reference path="../timers.d.ts" />
|
88
|
+
/// <reference path="../timers/promises.d.ts" />
|
89
|
+
/// <reference path="../tls.d.ts" />
|
90
|
+
/// <reference path="../trace_events.d.ts" />
|
91
|
+
/// <reference path="../tty.d.ts" />
|
92
|
+
/// <reference path="../url.d.ts" />
|
93
|
+
/// <reference path="../util.d.ts" />
|
94
|
+
/// <reference path="../v8.d.ts" />
|
95
|
+
/// <reference path="../vm.d.ts" />
|
96
|
+
/// <reference path="../wasi.d.ts" />
|
97
|
+
/// <reference path="../worker_threads.d.ts" />
|
98
|
+
/// <reference path="../zlib.d.ts" />
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// Interface declaration for Float16Array, required in @types/node v24+.
|
2
|
+
// These definitions are specific to TS <=5.6.
|
3
|
+
|
4
|
+
// This needs all of the "common" properties/methods of the TypedArrays,
|
5
|
+
// otherwise the type unions `TypedArray` and `ArrayBufferView` will be
|
6
|
+
// empty objects.
|
7
|
+
interface Float16Array extends Pick<Float32Array, typeof Symbol.iterator | "entries" | "keys" | "values"> {
|
8
|
+
readonly BYTES_PER_ELEMENT: number;
|
9
|
+
readonly buffer: ArrayBufferLike;
|
10
|
+
readonly byteLength: number;
|
11
|
+
readonly byteOffset: number;
|
12
|
+
readonly length: number;
|
13
|
+
readonly [Symbol.toStringTag]: "Float16Array";
|
14
|
+
at(index: number): number | undefined;
|
15
|
+
copyWithin(target: number, start: number, end?: number): this;
|
16
|
+
every(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean;
|
17
|
+
fill(value: number, start?: number, end?: number): this;
|
18
|
+
filter(predicate: (value: number, index: number, array: Float16Array) => any, thisArg?: any): Float16Array;
|
19
|
+
find(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number | undefined;
|
20
|
+
findIndex(predicate: (value: number, index: number, obj: Float16Array) => boolean, thisArg?: any): number;
|
21
|
+
findLast<S extends number>(
|
22
|
+
predicate: (value: number, index: number, array: Float16Array) => value is S,
|
23
|
+
thisArg?: any,
|
24
|
+
): S | undefined;
|
25
|
+
findLast(
|
26
|
+
predicate: (value: number, index: number, array: Float16Array) => unknown,
|
27
|
+
thisArg?: any,
|
28
|
+
): number | undefined;
|
29
|
+
findLastIndex(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): number;
|
30
|
+
forEach(callbackfn: (value: number, index: number, array: Float16Array) => void, thisArg?: any): void;
|
31
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
32
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
33
|
+
join(separator?: string): string;
|
34
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
35
|
+
map(callbackfn: (value: number, index: number, array: Float16Array) => number, thisArg?: any): Float16Array;
|
36
|
+
reduce(
|
37
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
|
38
|
+
): number;
|
39
|
+
reduce(
|
40
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
|
41
|
+
initialValue: number,
|
42
|
+
): number;
|
43
|
+
reduce<U>(
|
44
|
+
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U,
|
45
|
+
initialValue: U,
|
46
|
+
): U;
|
47
|
+
reduceRight(
|
48
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
|
49
|
+
): number;
|
50
|
+
reduceRight(
|
51
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float16Array) => number,
|
52
|
+
initialValue: number,
|
53
|
+
): number;
|
54
|
+
reduceRight<U>(
|
55
|
+
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float16Array) => U,
|
56
|
+
initialValue: U,
|
57
|
+
): U;
|
58
|
+
reverse(): Float16Array;
|
59
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
60
|
+
slice(start?: number, end?: number): Float16Array;
|
61
|
+
some(predicate: (value: number, index: number, array: Float16Array) => unknown, thisArg?: any): boolean;
|
62
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
63
|
+
subarray(begin?: number, end?: number): Float16Array;
|
64
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
65
|
+
toReversed(): Float16Array;
|
66
|
+
toSorted(compareFn?: (a: number, b: number) => number): Float16Array;
|
67
|
+
toString(): string;
|
68
|
+
valueOf(): Float16Array;
|
69
|
+
with(index: number, value: number): Float16Array;
|
70
|
+
[index: number]: number;
|
71
|
+
}
|
@@ -22,15 +22,19 @@
|
|
22
22
|
* IN THE SOFTWARE.
|
23
23
|
*/
|
24
24
|
|
25
|
-
// NOTE: These definitions support Node.js and TypeScript
|
25
|
+
// NOTE: These definitions support Node.js and TypeScript 5.2 through 5.6.
|
26
26
|
|
27
|
-
// Reference required TypeScript
|
27
|
+
// Reference required TypeScript libraries:
|
28
28
|
/// <reference lib="es2020" />
|
29
|
+
/// <reference lib="esnext.disposable" />
|
29
30
|
|
30
|
-
// TypeScript
|
31
|
-
/// <reference path="
|
31
|
+
// TypeScript library polyfills required for TypeScript <=5.6:
|
32
|
+
/// <reference path="./compatibility/float16array.d.ts" />
|
32
33
|
|
33
|
-
//
|
34
|
+
// Iterator definitions required for compatibility with TypeScript <5.6:
|
35
|
+
/// <reference path="../compatibility/iterators.d.ts" />
|
36
|
+
|
37
|
+
// Definitions for Node.js modules specific to TypeScript <=5.6:
|
34
38
|
/// <reference path="./globals.typedarray.d.ts" />
|
35
39
|
/// <reference path="./buffer.buffer.d.ts" />
|
36
40
|
|
@@ -0,0 +1,72 @@
|
|
1
|
+
// Interface declaration for Float16Array, required in @types/node v24+.
|
2
|
+
// These definitions are specific to TS 5.7.
|
3
|
+
|
4
|
+
// This needs all of the "common" properties/methods of the TypedArrays,
|
5
|
+
// otherwise the type unions `TypedArray` and `ArrayBufferView` will be
|
6
|
+
// empty objects.
|
7
|
+
interface Float16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
8
|
+
readonly BYTES_PER_ELEMENT: number;
|
9
|
+
readonly buffer: TArrayBuffer;
|
10
|
+
readonly byteLength: number;
|
11
|
+
readonly byteOffset: number;
|
12
|
+
readonly length: number;
|
13
|
+
readonly [Symbol.toStringTag]: "Float16Array";
|
14
|
+
at(index: number): number | undefined;
|
15
|
+
copyWithin(target: number, start: number, end?: number): this;
|
16
|
+
entries(): ArrayIterator<[number, number]>;
|
17
|
+
every(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
|
18
|
+
fill(value: number, start?: number, end?: number): this;
|
19
|
+
filter(predicate: (value: number, index: number, array: this) => any, thisArg?: any): Float16Array<ArrayBuffer>;
|
20
|
+
find(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number | undefined;
|
21
|
+
findIndex(predicate: (value: number, index: number, obj: this) => boolean, thisArg?: any): number;
|
22
|
+
findLast<S extends number>(
|
23
|
+
predicate: (value: number, index: number, array: this) => value is S,
|
24
|
+
thisArg?: any,
|
25
|
+
): S | undefined;
|
26
|
+
findLast(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number | undefined;
|
27
|
+
findLastIndex(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): number;
|
28
|
+
forEach(callbackfn: (value: number, index: number, array: this) => void, thisArg?: any): void;
|
29
|
+
includes(searchElement: number, fromIndex?: number): boolean;
|
30
|
+
indexOf(searchElement: number, fromIndex?: number): number;
|
31
|
+
join(separator?: string): string;
|
32
|
+
keys(): ArrayIterator<number>;
|
33
|
+
lastIndexOf(searchElement: number, fromIndex?: number): number;
|
34
|
+
map(callbackfn: (value: number, index: number, array: this) => number, thisArg?: any): Float16Array<ArrayBuffer>;
|
35
|
+
reduce(
|
36
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
|
37
|
+
): number;
|
38
|
+
reduce(
|
39
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
|
40
|
+
initialValue: number,
|
41
|
+
): number;
|
42
|
+
reduce<U>(
|
43
|
+
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U,
|
44
|
+
initialValue: U,
|
45
|
+
): U;
|
46
|
+
reduceRight(
|
47
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
|
48
|
+
): number;
|
49
|
+
reduceRight(
|
50
|
+
callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number,
|
51
|
+
initialValue: number,
|
52
|
+
): number;
|
53
|
+
reduceRight<U>(
|
54
|
+
callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: this) => U,
|
55
|
+
initialValue: U,
|
56
|
+
): U;
|
57
|
+
reverse(): this;
|
58
|
+
set(array: ArrayLike<number>, offset?: number): void;
|
59
|
+
slice(start?: number, end?: number): Float16Array<ArrayBuffer>;
|
60
|
+
some(predicate: (value: number, index: number, array: this) => unknown, thisArg?: any): boolean;
|
61
|
+
sort(compareFn?: (a: number, b: number) => number): this;
|
62
|
+
subarray(begin?: number, end?: number): Float16Array<TArrayBuffer>;
|
63
|
+
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
64
|
+
toReversed(): Float16Array<ArrayBuffer>;
|
65
|
+
toSorted(compareFn?: (a: number, b: number) => number): Float16Array<ArrayBuffer>;
|
66
|
+
toString(): string;
|
67
|
+
valueOf(): this;
|
68
|
+
values(): ArrayIterator<number>;
|
69
|
+
with(index: number, value: number): Float16Array<ArrayBuffer>;
|
70
|
+
[Symbol.iterator](): ArrayIterator<number>;
|
71
|
+
[index: number]: number;
|
72
|
+
}
|
node/ts5.7/index.d.ts
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
/**
|
2
|
+
* License for programmatically and manually incorporated
|
3
|
+
* documentation aka. `JSDoc` from https://github.com/nodejs/node/tree/master/doc
|
4
|
+
*
|
5
|
+
* Copyright Node.js contributors. All rights reserved.
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
* of this software and associated documentation files (the "Software"), to
|
8
|
+
* deal in the Software without restriction, including without limitation the
|
9
|
+
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
10
|
+
* sell copies of the Software, and to permit persons to whom the Software is
|
11
|
+
* furnished to do so, subject to the following conditions:
|
12
|
+
*
|
13
|
+
* The above copyright notice and this permission notice shall be included in
|
14
|
+
* all copies or substantial portions of the Software.
|
15
|
+
*
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
22
|
+
* IN THE SOFTWARE.
|
23
|
+
*/
|
24
|
+
|
25
|
+
// NOTE: These definitions support Node.js and TypeScript 5.7.
|
26
|
+
|
27
|
+
// Reference required TypeScript libraries:
|
28
|
+
/// <reference lib="es2020" />
|
29
|
+
/// <reference lib="esnext.disposable" />
|
30
|
+
|
31
|
+
// TypeScript library polyfills required for TypeScript 5.7:
|
32
|
+
/// <reference path="./compatibility/float16array.d.ts" />
|
33
|
+
|
34
|
+
// Iterator definitions required for compatibility with TypeScript <5.6:
|
35
|
+
/// <reference path="../compatibility/iterators.d.ts" />
|
36
|
+
|
37
|
+
// Definitions for Node.js modules specific to TypeScript 5.7+:
|
38
|
+
/// <reference path="../globals.typedarray.d.ts" />
|
39
|
+
/// <reference path="../buffer.buffer.d.ts" />
|
40
|
+
|
41
|
+
// Definitions for Node.js modules that are not specific to any version of TypeScript:
|
42
|
+
/// <reference path="../globals.d.ts" />
|
43
|
+
/// <reference path="../assert.d.ts" />
|
44
|
+
/// <reference path="../assert/strict.d.ts" />
|
45
|
+
/// <reference path="../async_hooks.d.ts" />
|
46
|
+
/// <reference path="../buffer.d.ts" />
|
47
|
+
/// <reference path="../child_process.d.ts" />
|
48
|
+
/// <reference path="../cluster.d.ts" />
|
49
|
+
/// <reference path="../console.d.ts" />
|
50
|
+
/// <reference path="../constants.d.ts" />
|
51
|
+
/// <reference path="../crypto.d.ts" />
|
52
|
+
/// <reference path="../dgram.d.ts" />
|
53
|
+
/// <reference path="../diagnostics_channel.d.ts" />
|
54
|
+
/// <reference path="../dns.d.ts" />
|
55
|
+
/// <reference path="../dns/promises.d.ts" />
|
56
|
+
/// <reference path="../dns/promises.d.ts" />
|
57
|
+
/// <reference path="../domain.d.ts" />
|
58
|
+
/// <reference path="../dom-events.d.ts" />
|
59
|
+
/// <reference path="../events.d.ts" />
|
60
|
+
/// <reference path="../fs.d.ts" />
|
61
|
+
/// <reference path="../fs/promises.d.ts" />
|
62
|
+
/// <reference path="../http.d.ts" />
|
63
|
+
/// <reference path="../http2.d.ts" />
|
64
|
+
/// <reference path="../https.d.ts" />
|
65
|
+
/// <reference path="../inspector.d.ts" />
|
66
|
+
/// <reference path="../module.d.ts" />
|
67
|
+
/// <reference path="../net.d.ts" />
|
68
|
+
/// <reference path="../os.d.ts" />
|
69
|
+
/// <reference path="../path.d.ts" />
|
70
|
+
/// <reference path="../perf_hooks.d.ts" />
|
71
|
+
/// <reference path="../process.d.ts" />
|
72
|
+
/// <reference path="../punycode.d.ts" />
|
73
|
+
/// <reference path="../querystring.d.ts" />
|
74
|
+
/// <reference path="../readline.d.ts" />
|
75
|
+
/// <reference path="../readline/promises.d.ts" />
|
76
|
+
/// <reference path="../repl.d.ts" />
|
77
|
+
/// <reference path="../sea.d.ts" />
|
78
|
+
/// <reference path="../sqlite.d.ts" />
|
79
|
+
/// <reference path="../stream.d.ts" />
|
80
|
+
/// <reference path="../stream/promises.d.ts" />
|
81
|
+
/// <reference path="../stream/consumers.d.ts" />
|
82
|
+
/// <reference path="../stream/web.d.ts" />
|
83
|
+
/// <reference path="../string_decoder.d.ts" />
|
84
|
+
/// <reference path="../test.d.ts" />
|
85
|
+
/// <reference path="../timers.d.ts" />
|
86
|
+
/// <reference path="../timers/promises.d.ts" />
|
87
|
+
/// <reference path="../tls.d.ts" />
|
88
|
+
/// <reference path="../trace_events.d.ts" />
|
89
|
+
/// <reference path="../tty.d.ts" />
|
90
|
+
/// <reference path="../url.d.ts" />
|
91
|
+
/// <reference path="../util.d.ts" />
|
92
|
+
/// <reference path="../v8.d.ts" />
|
93
|
+
/// <reference path="../vm.d.ts" />
|
94
|
+
/// <reference path="../wasi.d.ts" />
|
95
|
+
/// <reference path="../worker_threads.d.ts" />
|
96
|
+
/// <reference path="../zlib.d.ts" />
|
@@ -21,7 +21,7 @@
|
|
21
21
|
*
|
22
22
|
* In most cases, there should be little to no reason for an application to
|
23
23
|
* manually create instances of the `tty.ReadStream` and `tty.WriteStream` classes.
|
24
|
-
* @see [source](https://github.com/nodejs/node/blob/
|
24
|
+
* @see [source](https://github.com/nodejs/node/blob/v24.x/lib/tty.js)
|
25
25
|
*/
|
26
26
|
declare module "tty" {
|
27
27
|
import * as net from "node:net";
|