@types/node 18.19.51 → 18.19.52
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 v18.19/README.md +1 -1
- node v18.19/buffer.d.ts +12 -5
- node v18.19/package.json +2 -2
node v18.19/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/v18.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Wed, 25 Sep 2024
|
|
11
|
+
* Last updated: Wed, 25 Sep 2024 17:36:54 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node v18.19/buffer.d.ts
CHANGED
|
@@ -239,6 +239,13 @@ declare module "buffer" {
|
|
|
239
239
|
| {
|
|
240
240
|
valueOf(): T;
|
|
241
241
|
};
|
|
242
|
+
// `WithArrayBufferLike` is a backwards-compatible workaround for the addition of a `TArrayBuffer` type parameter to
|
|
243
|
+
// `Uint8Array` to ensure that `Buffer` remains assignment-compatible with `Uint8Array`, but without the added
|
|
244
|
+
// complexity involved with making `Buffer` itself generic as that would require re-introducing `"typesVersions"` to
|
|
245
|
+
// the NodeJS types. It is likely this interface will become deprecated in the future once `Buffer` does become generic.
|
|
246
|
+
interface WithArrayBufferLike<TArrayBuffer extends ArrayBufferLike> {
|
|
247
|
+
readonly buffer: TArrayBuffer;
|
|
248
|
+
}
|
|
242
249
|
/**
|
|
243
250
|
* Raw data is stored in instances of the Buffer class.
|
|
244
251
|
* A Buffer is similar to an array of integers but corresponds to a raw memory allocation outside the V8 heap. A Buffer cannot be resized.
|
|
@@ -890,7 +897,7 @@ declare module "buffer" {
|
|
|
890
897
|
* @param [start=0] Where the new `Buffer` will start.
|
|
891
898
|
* @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
|
|
892
899
|
*/
|
|
893
|
-
slice(start?: number, end?: number): Buffer
|
|
900
|
+
slice(start?: number, end?: number): Buffer & WithArrayBufferLike<ArrayBuffer>;
|
|
894
901
|
/**
|
|
895
902
|
* Returns a new `Buffer` that references the same memory as the original, but
|
|
896
903
|
* offset and cropped by the `start` and `end` indices.
|
|
@@ -950,7 +957,7 @@ declare module "buffer" {
|
|
|
950
957
|
* @param [start=0] Where the new `Buffer` will start.
|
|
951
958
|
* @param [end=buf.length] Where the new `Buffer` will end (not inclusive).
|
|
952
959
|
*/
|
|
953
|
-
subarray(start?: number, end?: number): Buffer
|
|
960
|
+
subarray(start?: number, end?: number): Buffer & WithArrayBufferLike<this["buffer"]>;
|
|
954
961
|
/**
|
|
955
962
|
* Writes `value` to `buf` at the specified `offset` as big-endian.
|
|
956
963
|
*
|
|
@@ -1608,7 +1615,7 @@ declare module "buffer" {
|
|
|
1608
1615
|
* @since v5.10.0
|
|
1609
1616
|
* @return A reference to `buf`.
|
|
1610
1617
|
*/
|
|
1611
|
-
swap16():
|
|
1618
|
+
swap16(): this;
|
|
1612
1619
|
/**
|
|
1613
1620
|
* Interprets `buf` as an array of unsigned 32-bit integers and swaps the
|
|
1614
1621
|
* byte order _in-place_. Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 4.
|
|
@@ -1634,7 +1641,7 @@ declare module "buffer" {
|
|
|
1634
1641
|
* @since v5.10.0
|
|
1635
1642
|
* @return A reference to `buf`.
|
|
1636
1643
|
*/
|
|
1637
|
-
swap32():
|
|
1644
|
+
swap32(): this;
|
|
1638
1645
|
/**
|
|
1639
1646
|
* Interprets `buf` as an array of 64-bit numbers and swaps byte order _in-place_.
|
|
1640
1647
|
* Throws `ERR_INVALID_BUFFER_SIZE` if `buf.length` is not a multiple of 8.
|
|
@@ -1660,7 +1667,7 @@ declare module "buffer" {
|
|
|
1660
1667
|
* @since v6.3.0
|
|
1661
1668
|
* @return A reference to `buf`.
|
|
1662
1669
|
*/
|
|
1663
|
-
swap64():
|
|
1670
|
+
swap64(): this;
|
|
1664
1671
|
/**
|
|
1665
1672
|
* Writes `value` to `buf` at the specified `offset`. `value` must be a
|
|
1666
1673
|
* valid unsigned 8-bit integer. Behavior is undefined when `value` is anything
|
node v18.19/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.19.
|
|
3
|
+
"version": "18.19.52",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -217,6 +217,6 @@
|
|
|
217
217
|
"dependencies": {
|
|
218
218
|
"undici-types": "~5.26.4"
|
|
219
219
|
},
|
|
220
|
-
"typesPublisherContentHash": "
|
|
220
|
+
"typesPublisherContentHash": "c5e11f0c0bb653f383dcacd42f70687ca79b812ad09bdc1d3f223504f7580085",
|
|
221
221
|
"typeScriptVersion": "4.8"
|
|
222
222
|
}
|