@types/node 20.11.19 → 20.11.20
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/buffer.d.ts +8 -7
- node/package.json +2 -2
- node/ts4.8/buffer.d.ts +8 -7
node/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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Thu,
|
|
11
|
+
* Last updated: Thu, 22 Feb 2024 18:35:22 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
node/buffer.d.ts
CHANGED
|
@@ -128,9 +128,10 @@ declare module "buffer" {
|
|
|
128
128
|
*/
|
|
129
129
|
export interface BlobOptions {
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
|
|
132
|
+
* will be converted to the platform native line-ending as specified by `require('node:os').EOL`.
|
|
132
133
|
*/
|
|
133
|
-
|
|
134
|
+
endings?: "transparent" | "native";
|
|
134
135
|
/**
|
|
135
136
|
* The Blob content-type. The intent is for `type` to convey
|
|
136
137
|
* the MIME media type of the data, however no validation of the type format
|
|
@@ -162,7 +163,7 @@ declare module "buffer" {
|
|
|
162
163
|
*
|
|
163
164
|
* String sources are also copied into the `Blob`.
|
|
164
165
|
*/
|
|
165
|
-
constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
|
|
166
|
+
constructor(sources: Array<ArrayBuffer | BinaryLike | Blob>, options?: BlobOptions);
|
|
166
167
|
/**
|
|
167
168
|
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
168
169
|
* the `Blob` data.
|
|
@@ -415,7 +416,7 @@ declare module "buffer" {
|
|
|
415
416
|
* @return The number of bytes contained within `string`.
|
|
416
417
|
*/
|
|
417
418
|
byteLength(
|
|
418
|
-
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
419
|
+
string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
419
420
|
encoding?: BufferEncoding,
|
|
420
421
|
): number;
|
|
421
422
|
/**
|
|
@@ -470,7 +471,7 @@ declare module "buffer" {
|
|
|
470
471
|
* ```
|
|
471
472
|
* @since v19.8.0
|
|
472
473
|
* @param view The {TypedArray} to copy.
|
|
473
|
-
* @param [offset=
|
|
474
|
+
* @param [offset=0] The starting offset within `view`.
|
|
474
475
|
* @param [length=view.length - offset] The number of elements from `view` to copy.
|
|
475
476
|
*/
|
|
476
477
|
copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
|
|
@@ -563,8 +564,8 @@ declare module "buffer" {
|
|
|
563
564
|
* A `TypeError` will be thrown if `size` is not a number.
|
|
564
565
|
*
|
|
565
566
|
* The `Buffer` module pre-allocates an internal `Buffer` instance of
|
|
566
|
-
* size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
|
|
567
|
-
* and `Buffer.concat()` only when `size` is less than`Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
|
|
567
|
+
* size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
|
|
568
|
+
* and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
|
|
568
569
|
*
|
|
569
570
|
* Use of this pre-allocated internal memory pool is a key difference between
|
|
570
571
|
* calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.11.
|
|
3
|
+
"version": "20.11.20",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -224,6 +224,6 @@
|
|
|
224
224
|
"dependencies": {
|
|
225
225
|
"undici-types": "~5.26.4"
|
|
226
226
|
},
|
|
227
|
-
"typesPublisherContentHash": "
|
|
227
|
+
"typesPublisherContentHash": "dfa64fc9edf277014e0891497b18331e7e1a1eba3aaa4a672ff11b1ba8eb5da1",
|
|
228
228
|
"typeScriptVersion": "4.6"
|
|
229
229
|
}
|
node/ts4.8/buffer.d.ts
CHANGED
|
@@ -128,9 +128,10 @@ declare module "buffer" {
|
|
|
128
128
|
*/
|
|
129
129
|
export interface BlobOptions {
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* One of either `'transparent'` or `'native'`. When set to `'native'`, line endings in string source parts
|
|
132
|
+
* will be converted to the platform native line-ending as specified by `require('node:os').EOL`.
|
|
132
133
|
*/
|
|
133
|
-
|
|
134
|
+
endings?: "transparent" | "native";
|
|
134
135
|
/**
|
|
135
136
|
* The Blob content-type. The intent is for `type` to convey
|
|
136
137
|
* the MIME media type of the data, however no validation of the type format
|
|
@@ -162,7 +163,7 @@ declare module "buffer" {
|
|
|
162
163
|
*
|
|
163
164
|
* String sources are also copied into the `Blob`.
|
|
164
165
|
*/
|
|
165
|
-
constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
|
|
166
|
+
constructor(sources: Array<ArrayBuffer | BinaryLike | Blob>, options?: BlobOptions);
|
|
166
167
|
/**
|
|
167
168
|
* Returns a promise that fulfills with an [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) containing a copy of
|
|
168
169
|
* the `Blob` data.
|
|
@@ -415,7 +416,7 @@ declare module "buffer" {
|
|
|
415
416
|
* @return The number of bytes contained within `string`.
|
|
416
417
|
*/
|
|
417
418
|
byteLength(
|
|
418
|
-
string: string | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
419
|
+
string: string | Buffer | NodeJS.ArrayBufferView | ArrayBuffer | SharedArrayBuffer,
|
|
419
420
|
encoding?: BufferEncoding,
|
|
420
421
|
): number;
|
|
421
422
|
/**
|
|
@@ -470,7 +471,7 @@ declare module "buffer" {
|
|
|
470
471
|
* ```
|
|
471
472
|
* @since v19.8.0
|
|
472
473
|
* @param view The {TypedArray} to copy.
|
|
473
|
-
* @param [offset=
|
|
474
|
+
* @param [offset=0] The starting offset within `view`.
|
|
474
475
|
* @param [length=view.length - offset] The number of elements from `view` to copy.
|
|
475
476
|
*/
|
|
476
477
|
copyBytesFrom(view: NodeJS.TypedArray, offset?: number, length?: number): Buffer;
|
|
@@ -563,8 +564,8 @@ declare module "buffer" {
|
|
|
563
564
|
* A `TypeError` will be thrown if `size` is not a number.
|
|
564
565
|
*
|
|
565
566
|
* The `Buffer` module pre-allocates an internal `Buffer` instance of
|
|
566
|
-
* size `Buffer.poolSize` that is used as a pool for the fast allocation of new`Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
|
|
567
|
-
* and `Buffer.concat()` only when `size` is less than`Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
|
|
567
|
+
* size `Buffer.poolSize` that is used as a pool for the fast allocation of new `Buffer` instances created using `Buffer.allocUnsafe()`, `Buffer.from(array)`,
|
|
568
|
+
* and `Buffer.concat()` only when `size` is less than `Buffer.poolSize >>> 1` (floor of `Buffer.poolSize` divided by two).
|
|
568
569
|
*
|
|
569
570
|
* Use of this pre-allocated internal memory pool is a key difference between
|
|
570
571
|
* calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.
|