@types/node 18.19.9 → 18.19.11
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/package.json +3 -4
- node v18.19/string_decoder.d.ts +13 -13
- node v18.19/ts4.8/string_decoder.d.ts +13 -13
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:
|
|
11
|
+
* Last updated: Tue, 30 Jan 2024 21:35:45 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
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.11",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -229,7 +229,6 @@
|
|
|
229
229
|
"dependencies": {
|
|
230
230
|
"undici-types": "~5.26.4"
|
|
231
231
|
},
|
|
232
|
-
"typesPublisherContentHash": "
|
|
233
|
-
"typeScriptVersion": "4.6"
|
|
234
|
-
"nonNpm": true
|
|
232
|
+
"typesPublisherContentHash": "dc8372d8a057aea576edabd9954e60dd05292b04d30097a20d1603e30c30b9be",
|
|
233
|
+
"typeScriptVersion": "4.6"
|
|
235
234
|
}
|
node v18.19/string_decoder.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `string_decoder` module provides an API for decoding `Buffer` objects
|
|
3
|
-
* strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
|
|
2
|
+
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
|
|
3
|
+
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
|
|
4
4
|
* characters. It can be accessed using:
|
|
5
5
|
*
|
|
6
6
|
* ```js
|
|
7
|
-
* const { StringDecoder } = require('string_decoder');
|
|
7
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
10
|
* The following example shows the basic use of the `StringDecoder` class.
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
* const { StringDecoder } = require('string_decoder');
|
|
13
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
14
14
|
* const decoder = new StringDecoder('utf8');
|
|
15
15
|
*
|
|
16
16
|
* const cent = Buffer.from([0xC2, 0xA2]);
|
|
17
|
-
* console.log(decoder.write(cent));
|
|
17
|
+
* console.log(decoder.write(cent)); // Prints: ¢
|
|
18
18
|
*
|
|
19
19
|
* const euro = Buffer.from([0xE2, 0x82, 0xAC]);
|
|
20
|
-
* console.log(decoder.write(euro));
|
|
20
|
+
* console.log(decoder.write(euro)); // Prints: €
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* When a `Buffer` instance is written to the `StringDecoder` instance, an
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
* symbol (`€`) are written over three separate operations:
|
|
30
30
|
*
|
|
31
31
|
* ```js
|
|
32
|
-
* const { StringDecoder } = require('string_decoder');
|
|
32
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
33
33
|
* const decoder = new StringDecoder('utf8');
|
|
34
34
|
*
|
|
35
35
|
* decoder.write(Buffer.from([0xE2]));
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
|
-
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
37
|
+
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.19.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module "string_decoder" {
|
|
42
42
|
class StringDecoder {
|
|
@@ -46,9 +46,9 @@ declare module "string_decoder" {
|
|
|
46
46
|
* the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
|
|
47
47
|
* returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
|
|
48
48
|
* @since v0.1.99
|
|
49
|
-
* @param buffer
|
|
49
|
+
* @param buffer The bytes to decode.
|
|
50
50
|
*/
|
|
51
|
-
write(buffer: Buffer): string;
|
|
51
|
+
write(buffer: string | Buffer | NodeJS.ArrayBufferView): string;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any remaining input stored in the internal buffer as a string. Bytes
|
|
54
54
|
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
|
|
@@ -57,9 +57,9 @@ declare module "string_decoder" {
|
|
|
57
57
|
* If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
|
|
58
58
|
* After `end()` is called, the `stringDecoder` object can be reused for new input.
|
|
59
59
|
* @since v0.9.3
|
|
60
|
-
* @param buffer
|
|
60
|
+
* @param buffer The bytes to decode.
|
|
61
61
|
*/
|
|
62
|
-
end(buffer?: Buffer): string;
|
|
62
|
+
end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
declare module "node:string_decoder" {
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The `string_decoder` module provides an API for decoding `Buffer` objects
|
|
3
|
-
* strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
|
|
2
|
+
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
|
|
3
|
+
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
|
|
4
4
|
* characters. It can be accessed using:
|
|
5
5
|
*
|
|
6
6
|
* ```js
|
|
7
|
-
* const { StringDecoder } = require('string_decoder');
|
|
7
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
8
8
|
* ```
|
|
9
9
|
*
|
|
10
10
|
* The following example shows the basic use of the `StringDecoder` class.
|
|
11
11
|
*
|
|
12
12
|
* ```js
|
|
13
|
-
* const { StringDecoder } = require('string_decoder');
|
|
13
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
14
14
|
* const decoder = new StringDecoder('utf8');
|
|
15
15
|
*
|
|
16
16
|
* const cent = Buffer.from([0xC2, 0xA2]);
|
|
17
|
-
* console.log(decoder.write(cent));
|
|
17
|
+
* console.log(decoder.write(cent)); // Prints: ¢
|
|
18
18
|
*
|
|
19
19
|
* const euro = Buffer.from([0xE2, 0x82, 0xAC]);
|
|
20
|
-
* console.log(decoder.write(euro));
|
|
20
|
+
* console.log(decoder.write(euro)); // Prints: €
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* When a `Buffer` instance is written to the `StringDecoder` instance, an
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
* symbol (`€`) are written over three separate operations:
|
|
30
30
|
*
|
|
31
31
|
* ```js
|
|
32
|
-
* const { StringDecoder } = require('string_decoder');
|
|
32
|
+
* const { StringDecoder } = require('node:string_decoder');
|
|
33
33
|
* const decoder = new StringDecoder('utf8');
|
|
34
34
|
*
|
|
35
35
|
* decoder.write(Buffer.from([0xE2]));
|
|
36
36
|
* decoder.write(Buffer.from([0x82]));
|
|
37
|
-
* console.log(decoder.end(Buffer.from([0xAC])));
|
|
37
|
+
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
|
|
38
38
|
* ```
|
|
39
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.
|
|
39
|
+
* @see [source](https://github.com/nodejs/node/blob/v18.19.0/lib/string_decoder.js)
|
|
40
40
|
*/
|
|
41
41
|
declare module "string_decoder" {
|
|
42
42
|
class StringDecoder {
|
|
@@ -46,9 +46,9 @@ declare module "string_decoder" {
|
|
|
46
46
|
* the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
|
|
47
47
|
* returned string and stored in an internal buffer for the next call to`stringDecoder.write()` or `stringDecoder.end()`.
|
|
48
48
|
* @since v0.1.99
|
|
49
|
-
* @param buffer
|
|
49
|
+
* @param buffer The bytes to decode.
|
|
50
50
|
*/
|
|
51
|
-
write(buffer: Buffer): string;
|
|
51
|
+
write(buffer: string | Buffer | NodeJS.ArrayBufferView): string;
|
|
52
52
|
/**
|
|
53
53
|
* Returns any remaining input stored in the internal buffer as a string. Bytes
|
|
54
54
|
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
|
|
@@ -57,9 +57,9 @@ declare module "string_decoder" {
|
|
|
57
57
|
* If the `buffer` argument is provided, one final call to `stringDecoder.write()`is performed before returning the remaining input.
|
|
58
58
|
* After `end()` is called, the `stringDecoder` object can be reused for new input.
|
|
59
59
|
* @since v0.9.3
|
|
60
|
-
* @param buffer
|
|
60
|
+
* @param buffer The bytes to decode.
|
|
61
61
|
*/
|
|
62
|
-
end(buffer?: Buffer): string;
|
|
62
|
+
end(buffer?: string | Buffer | NodeJS.ArrayBufferView): string;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
declare module "node:string_decoder" {
|