@types/node 24.12.1 → 24.12.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 v24.12/README.md +1 -1
- node v24.12/http2.d.ts +78 -12
- node v24.12/net.d.ts +21 -2
- node v24.12/package.json +2 -2
- node v24.12/stream.d.ts +27 -4
node v24.12/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 07 May 2026 22:21:35 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node v24.12/http2.d.ts
CHANGED
|
@@ -1475,7 +1475,13 @@ declare module "http2" {
|
|
|
1475
1475
|
event: "session",
|
|
1476
1476
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1477
1477
|
): this;
|
|
1478
|
-
addListener(
|
|
1478
|
+
addListener(
|
|
1479
|
+
event: "sessionError",
|
|
1480
|
+
listener: (
|
|
1481
|
+
err: Error,
|
|
1482
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1483
|
+
) => void,
|
|
1484
|
+
): this;
|
|
1479
1485
|
addListener(
|
|
1480
1486
|
event: "stream",
|
|
1481
1487
|
listener: (
|
|
@@ -1497,7 +1503,11 @@ declare module "http2" {
|
|
|
1497
1503
|
event: "session",
|
|
1498
1504
|
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1499
1505
|
): boolean;
|
|
1500
|
-
emit(
|
|
1506
|
+
emit(
|
|
1507
|
+
event: "sessionError",
|
|
1508
|
+
err: Error,
|
|
1509
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1510
|
+
): boolean;
|
|
1501
1511
|
emit(
|
|
1502
1512
|
event: "stream",
|
|
1503
1513
|
stream: ServerHttp2Stream,
|
|
@@ -1519,7 +1529,13 @@ declare module "http2" {
|
|
|
1519
1529
|
event: "session",
|
|
1520
1530
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1521
1531
|
): this;
|
|
1522
|
-
on(
|
|
1532
|
+
on(
|
|
1533
|
+
event: "sessionError",
|
|
1534
|
+
listener: (
|
|
1535
|
+
err: Error,
|
|
1536
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1537
|
+
) => void,
|
|
1538
|
+
): this;
|
|
1523
1539
|
on(
|
|
1524
1540
|
event: "stream",
|
|
1525
1541
|
listener: (
|
|
@@ -1543,7 +1559,13 @@ declare module "http2" {
|
|
|
1543
1559
|
event: "session",
|
|
1544
1560
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1545
1561
|
): this;
|
|
1546
|
-
once(
|
|
1562
|
+
once(
|
|
1563
|
+
event: "sessionError",
|
|
1564
|
+
listener: (
|
|
1565
|
+
err: Error,
|
|
1566
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1567
|
+
) => void,
|
|
1568
|
+
): this;
|
|
1547
1569
|
once(
|
|
1548
1570
|
event: "stream",
|
|
1549
1571
|
listener: (
|
|
@@ -1567,7 +1589,13 @@ declare module "http2" {
|
|
|
1567
1589
|
event: "session",
|
|
1568
1590
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1569
1591
|
): this;
|
|
1570
|
-
prependListener(
|
|
1592
|
+
prependListener(
|
|
1593
|
+
event: "sessionError",
|
|
1594
|
+
listener: (
|
|
1595
|
+
err: Error,
|
|
1596
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1597
|
+
) => void,
|
|
1598
|
+
): this;
|
|
1571
1599
|
prependListener(
|
|
1572
1600
|
event: "stream",
|
|
1573
1601
|
listener: (
|
|
@@ -1591,7 +1619,13 @@ declare module "http2" {
|
|
|
1591
1619
|
event: "session",
|
|
1592
1620
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1593
1621
|
): this;
|
|
1594
|
-
prependOnceListener(
|
|
1622
|
+
prependOnceListener(
|
|
1623
|
+
event: "sessionError",
|
|
1624
|
+
listener: (
|
|
1625
|
+
err: Error,
|
|
1626
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1627
|
+
) => void,
|
|
1628
|
+
): this;
|
|
1595
1629
|
prependOnceListener(
|
|
1596
1630
|
event: "stream",
|
|
1597
1631
|
listener: (
|
|
@@ -1622,7 +1656,11 @@ declare module "http2" {
|
|
|
1622
1656
|
event: "session",
|
|
1623
1657
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1624
1658
|
): this;
|
|
1625
|
-
addListener(
|
|
1659
|
+
addListener(
|
|
1660
|
+
event: "sessionError",
|
|
1661
|
+
listener: (err: Error) => void,
|
|
1662
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1663
|
+
): this;
|
|
1626
1664
|
addListener(
|
|
1627
1665
|
event: "stream",
|
|
1628
1666
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
@@ -1640,7 +1678,11 @@ declare module "http2" {
|
|
|
1640
1678
|
event: "session",
|
|
1641
1679
|
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1642
1680
|
): boolean;
|
|
1643
|
-
emit(
|
|
1681
|
+
emit(
|
|
1682
|
+
event: "sessionError",
|
|
1683
|
+
err: Error,
|
|
1684
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1685
|
+
): boolean;
|
|
1644
1686
|
emit(event: "stream", stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number): boolean;
|
|
1645
1687
|
emit(event: "timeout"): boolean;
|
|
1646
1688
|
emit(event: "unknownProtocol", socket: tls.TLSSocket): boolean;
|
|
@@ -1657,7 +1699,13 @@ declare module "http2" {
|
|
|
1657
1699
|
event: "session",
|
|
1658
1700
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1659
1701
|
): this;
|
|
1660
|
-
on(
|
|
1702
|
+
on(
|
|
1703
|
+
event: "sessionError",
|
|
1704
|
+
listener: (
|
|
1705
|
+
err: Error,
|
|
1706
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1707
|
+
) => void,
|
|
1708
|
+
): this;
|
|
1661
1709
|
on(
|
|
1662
1710
|
event: "stream",
|
|
1663
1711
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
@@ -1677,7 +1725,13 @@ declare module "http2" {
|
|
|
1677
1725
|
event: "session",
|
|
1678
1726
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1679
1727
|
): this;
|
|
1680
|
-
once(
|
|
1728
|
+
once(
|
|
1729
|
+
event: "sessionError",
|
|
1730
|
+
listener: (
|
|
1731
|
+
err: Error,
|
|
1732
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1733
|
+
) => void,
|
|
1734
|
+
): this;
|
|
1681
1735
|
once(
|
|
1682
1736
|
event: "stream",
|
|
1683
1737
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
@@ -1697,7 +1751,13 @@ declare module "http2" {
|
|
|
1697
1751
|
event: "session",
|
|
1698
1752
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1699
1753
|
): this;
|
|
1700
|
-
prependListener(
|
|
1754
|
+
prependListener(
|
|
1755
|
+
event: "sessionError",
|
|
1756
|
+
listener: (
|
|
1757
|
+
err: Error,
|
|
1758
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1759
|
+
) => void,
|
|
1760
|
+
): this;
|
|
1701
1761
|
prependListener(
|
|
1702
1762
|
event: "stream",
|
|
1703
1763
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
|
@@ -1717,7 +1777,13 @@ declare module "http2" {
|
|
|
1717
1777
|
event: "session",
|
|
1718
1778
|
listener: (session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>) => void,
|
|
1719
1779
|
): this;
|
|
1720
|
-
prependOnceListener(
|
|
1780
|
+
prependOnceListener(
|
|
1781
|
+
event: "sessionError",
|
|
1782
|
+
listener: (
|
|
1783
|
+
err: Error,
|
|
1784
|
+
session: ServerHttp2Session<Http1Request, Http1Response, Http2Request, Http2Response>,
|
|
1785
|
+
) => void,
|
|
1786
|
+
): this;
|
|
1721
1787
|
prependOnceListener(
|
|
1722
1788
|
event: "stream",
|
|
1723
1789
|
listener: (stream: ServerHttp2Stream, headers: IncomingHttpHeaders, flags: number) => void,
|
node v24.12/net.d.ts
CHANGED
|
@@ -105,9 +105,14 @@ declare module "net" {
|
|
|
105
105
|
* See `Writable` stream `write()` method for more
|
|
106
106
|
* information.
|
|
107
107
|
* @since v0.1.90
|
|
108
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
109
108
|
*/
|
|
110
109
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Sends data on the socket, with an explicit encoding for string data.
|
|
112
|
+
* @see {@link Socket.write} for full details.
|
|
113
|
+
* @since v0.1.90
|
|
114
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
115
|
+
*/
|
|
111
116
|
write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
112
117
|
/**
|
|
113
118
|
* Initiate a connection on a given socket.
|
|
@@ -347,12 +352,26 @@ declare module "net" {
|
|
|
347
352
|
*
|
|
348
353
|
* See `writable.end()` for further details.
|
|
349
354
|
* @since v0.1.90
|
|
350
|
-
* @param [encoding='utf8'] Only used when data is `string`.
|
|
351
355
|
* @param callback Optional callback for when the socket is finished.
|
|
352
356
|
* @return The socket itself.
|
|
353
357
|
*/
|
|
354
358
|
end(callback?: () => void): this;
|
|
359
|
+
/**
|
|
360
|
+
* Half-closes the socket, with one final chunk of data.
|
|
361
|
+
* @see {@link Socket.end} for full details.
|
|
362
|
+
* @since v0.1.90
|
|
363
|
+
* @param callback Optional callback for when the socket is finished.
|
|
364
|
+
* @return The socket itself.
|
|
365
|
+
*/
|
|
355
366
|
end(buffer: Uint8Array | string, callback?: () => void): this;
|
|
367
|
+
/**
|
|
368
|
+
* Half-closes the socket, with one final chunk of data.
|
|
369
|
+
* @see {@link Socket.end} for full details.
|
|
370
|
+
* @since v0.1.90
|
|
371
|
+
* @param [encoding='utf8'] Only used when data is `string`.
|
|
372
|
+
* @param callback Optional callback for when the socket is finished.
|
|
373
|
+
* @return The socket itself.
|
|
374
|
+
*/
|
|
356
375
|
end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
|
|
357
376
|
/**
|
|
358
377
|
* events.EventEmitter
|
node v24.12/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "24.12.
|
|
3
|
+
"version": "24.12.3",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -150,6 +150,6 @@
|
|
|
150
150
|
"undici-types": "~7.16.0"
|
|
151
151
|
},
|
|
152
152
|
"peerDependencies": {},
|
|
153
|
-
"typesPublisherContentHash": "
|
|
153
|
+
"typesPublisherContentHash": "b739507708fe87e7676b4fc3062718186fca41edcad460e8b76f9c01934c1097",
|
|
154
154
|
"typeScriptVersion": "5.3"
|
|
155
155
|
}
|
node v24.12/stream.d.ts
CHANGED
|
@@ -863,11 +863,20 @@ declare module "stream" {
|
|
|
863
863
|
* @since v0.9.4
|
|
864
864
|
* @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
|
|
865
865
|
* {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
|
|
866
|
-
* @param [encoding='utf8'] The encoding, if `chunk` is a string.
|
|
867
866
|
* @param callback Callback for when this chunk of data is flushed.
|
|
868
867
|
* @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
869
868
|
*/
|
|
870
869
|
write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
|
|
870
|
+
/**
|
|
871
|
+
* Writes data to the stream, with an explicit encoding for string data.
|
|
872
|
+
* @see {@link Writable.write} for full details.
|
|
873
|
+
* @since v0.9.4
|
|
874
|
+
* @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
|
|
875
|
+
* {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
|
|
876
|
+
* @param encoding The encoding, if `chunk` is a string.
|
|
877
|
+
* @param callback Callback for when this chunk of data is flushed.
|
|
878
|
+
* @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
|
|
879
|
+
*/
|
|
871
880
|
write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
|
|
872
881
|
/**
|
|
873
882
|
* The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
|
|
@@ -892,13 +901,27 @@ declare module "stream" {
|
|
|
892
901
|
* // Writing more now is not allowed!
|
|
893
902
|
* ```
|
|
894
903
|
* @since v0.9.4
|
|
904
|
+
* @param cb Callback for when the stream is finished.
|
|
905
|
+
*/
|
|
906
|
+
end(cb?: () => void): this;
|
|
907
|
+
/**
|
|
908
|
+
* Signals that no more data will be written, with one final chunk of data.
|
|
909
|
+
* @see {@link Writable.end} for full details.
|
|
910
|
+
* @since v0.9.4
|
|
895
911
|
* @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
|
|
896
912
|
* {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
|
|
897
|
-
* @param
|
|
898
|
-
* @param callback Callback for when the stream is finished.
|
|
913
|
+
* @param cb Callback for when the stream is finished.
|
|
899
914
|
*/
|
|
900
|
-
end(cb?: () => void): this;
|
|
901
915
|
end(chunk: any, cb?: () => void): this;
|
|
916
|
+
/**
|
|
917
|
+
* Signals that no more data will be written, with one final chunk of data.
|
|
918
|
+
* @see {@link Writable.end} for full details.
|
|
919
|
+
* @since v0.9.4
|
|
920
|
+
* @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
|
|
921
|
+
* {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
|
|
922
|
+
* @param encoding The encoding if `chunk` is a string
|
|
923
|
+
* @param cb Callback for when the stream is finished.
|
|
924
|
+
*/
|
|
902
925
|
end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
|
|
903
926
|
/**
|
|
904
927
|
* The `writable.cork()` method forces all written data to be buffered in memory.
|