@types/node 14.18.6 → 14.18.7
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 v14.18/README.md +1 -1
- node v14.18/buffer.d.ts +64 -0
- node v14.18/package.json +2 -2
node v14.18/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v14.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated: Mon, 17 Jan 2022
|
|
11
|
+
* Last updated: Mon, 17 Jan 2022 17:01:42 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v14.18/buffer.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module 'buffer' {
|
|
2
|
+
import { BinaryLike } from 'node:crypto';
|
|
2
3
|
export const INSPECT_MAX_BYTES: number;
|
|
3
4
|
export const kMaxLength: number;
|
|
4
5
|
export const kStringMaxLength: number;
|
|
@@ -17,6 +18,69 @@ declare module 'buffer' {
|
|
|
17
18
|
new(size: number): Buffer;
|
|
18
19
|
prototype: Buffer;
|
|
19
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* @experimental
|
|
23
|
+
*/
|
|
24
|
+
export interface BlobOptions {
|
|
25
|
+
/**
|
|
26
|
+
* @default 'utf8'
|
|
27
|
+
*/
|
|
28
|
+
encoding?: BufferEncoding | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The Blob content-type. The intent is for `type` to convey
|
|
31
|
+
* the MIME media type of the data, however no validation of the type format
|
|
32
|
+
* is performed.
|
|
33
|
+
*/
|
|
34
|
+
type?: string | undefined;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) encapsulates immutable, raw data that can be safely shared across
|
|
38
|
+
* multiple worker threads.
|
|
39
|
+
* @since v14.18.0
|
|
40
|
+
* @experimental
|
|
41
|
+
*/
|
|
42
|
+
export class Blob {
|
|
43
|
+
/**
|
|
44
|
+
* The total size of the `Blob` in bytes.
|
|
45
|
+
* @since v14.18.0
|
|
46
|
+
*/
|
|
47
|
+
readonly size: number;
|
|
48
|
+
/**
|
|
49
|
+
* The content-type of the `Blob`.
|
|
50
|
+
* @since v14.18.0
|
|
51
|
+
*/
|
|
52
|
+
readonly type: string;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a new `Blob` object containing a concatenation of the given sources.
|
|
55
|
+
*
|
|
56
|
+
* {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into
|
|
57
|
+
* the 'Blob' and can therefore be safely modified after the 'Blob' is created.
|
|
58
|
+
*
|
|
59
|
+
* String sources are also copied into the `Blob`.
|
|
60
|
+
*/
|
|
61
|
+
constructor(sources: Array<BinaryLike | Blob>, options?: BlobOptions);
|
|
62
|
+
/**
|
|
63
|
+
* 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
|
|
64
|
+
* the `Blob` data.
|
|
65
|
+
* @since v14.18.0
|
|
66
|
+
*/
|
|
67
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
68
|
+
/**
|
|
69
|
+
* Creates and returns a new `Blob` containing a subset of this `Blob` objects
|
|
70
|
+
* data. The original `Blob` is not altered.
|
|
71
|
+
* @since v14.18.0
|
|
72
|
+
* @param start The starting index.
|
|
73
|
+
* @param end The ending index.
|
|
74
|
+
* @param type The content-type for the new `Blob`
|
|
75
|
+
*/
|
|
76
|
+
slice(start?: number, end?: number, type?: string): Blob;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a promise that fulfills with the contents of the `Blob` decoded as a
|
|
79
|
+
* UTF-8 string.
|
|
80
|
+
* @since v14.18.0
|
|
81
|
+
*/
|
|
82
|
+
text(): Promise<string>;
|
|
83
|
+
}
|
|
20
84
|
|
|
21
85
|
export { BuffType as Buffer };
|
|
22
86
|
}
|
node v14.18/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.18.
|
|
3
|
+
"version": "14.18.7",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -225,6 +225,6 @@
|
|
|
225
225
|
},
|
|
226
226
|
"scripts": {},
|
|
227
227
|
"dependencies": {},
|
|
228
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "fc61fb497c8bdd227f9c1c1a669183fede818f46462910663e18937f4ea8da46",
|
|
229
229
|
"typeScriptVersion": "3.8"
|
|
230
230
|
}
|