@types/node 14.18.3 → 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/globals.d.ts +3 -3
- node v14.18/http.d.ts +3 -1
- node v14.18/http2.d.ts +3 -3
- node v14.18/net.d.ts +3 -3
- node v14.18/package.json +2 -2
- node v14.18/process.d.ts +1 -1
- node v14.18/stream.d.ts +8 -8
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:
|
|
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/globals.d.ts
CHANGED
|
@@ -457,9 +457,9 @@ declare namespace NodeJS {
|
|
|
457
457
|
writable: boolean;
|
|
458
458
|
write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
|
|
459
459
|
write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
|
|
460
|
-
end(cb?: () => void):
|
|
461
|
-
end(data: string | Uint8Array, cb?: () => void):
|
|
462
|
-
end(str: string, encoding?: BufferEncoding, cb?: () => void):
|
|
460
|
+
end(cb?: () => void): this;
|
|
461
|
+
end(data: string | Uint8Array, cb?: () => void): this;
|
|
462
|
+
end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
interface ReadWriteStream extends ReadableStream, WritableStream { }
|
node v14.18/http.d.ts
CHANGED
|
@@ -279,6 +279,8 @@ declare module 'http' {
|
|
|
279
279
|
aborted: boolean;
|
|
280
280
|
host: string;
|
|
281
281
|
protocol: string;
|
|
282
|
+
reusedSocket: boolean;
|
|
283
|
+
maxHeadersCount: number;
|
|
282
284
|
|
|
283
285
|
constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
|
|
284
286
|
|
|
@@ -406,7 +408,7 @@ declare module 'http' {
|
|
|
406
408
|
* Only valid for response obtained from http.ClientRequest.
|
|
407
409
|
*/
|
|
408
410
|
statusMessage?: string | undefined;
|
|
409
|
-
destroy(error?: Error):
|
|
411
|
+
destroy(error?: Error): this;
|
|
410
412
|
}
|
|
411
413
|
|
|
412
414
|
interface AgentOptions {
|
node v14.18/http2.d.ts
CHANGED
|
@@ -660,9 +660,9 @@ declare module 'http2' {
|
|
|
660
660
|
statusCode: number;
|
|
661
661
|
statusMessage: '';
|
|
662
662
|
addTrailers(trailers: OutgoingHttpHeaders): void;
|
|
663
|
-
end(callback?: () => void):
|
|
664
|
-
end(data: string | Uint8Array, callback?: () => void):
|
|
665
|
-
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void):
|
|
663
|
+
end(callback?: () => void): this;
|
|
664
|
+
end(data: string | Uint8Array, callback?: () => void): this;
|
|
665
|
+
end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
|
|
666
666
|
getHeader(name: string): string;
|
|
667
667
|
getHeaderNames(): string[];
|
|
668
668
|
getHeaders(): OutgoingHttpHeaders;
|
node v14.18/net.d.ts
CHANGED
|
@@ -92,9 +92,9 @@ declare module 'net' {
|
|
|
92
92
|
readonly remotePort?: number | undefined;
|
|
93
93
|
|
|
94
94
|
// Extended base methods
|
|
95
|
-
end(cb?: () => void):
|
|
96
|
-
end(buffer: Uint8Array | string, cb?: () => void):
|
|
97
|
-
end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void):
|
|
95
|
+
end(cb?: () => void): this;
|
|
96
|
+
end(buffer: Uint8Array | string, cb?: () => void): this;
|
|
97
|
+
end(str: Uint8Array | string, encoding?: BufferEncoding, cb?: () => void): this;
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
100
|
* events.EventEmitter
|
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
|
}
|
node v14.18/process.d.ts
CHANGED
node v14.18/stream.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ declare module 'stream' {
|
|
|
45
45
|
wrap(oldStream: NodeJS.ReadableStream): this;
|
|
46
46
|
push(chunk: any, encoding?: BufferEncoding): boolean;
|
|
47
47
|
_destroy(error: Error | null, callback: (error?: Error | null) => void): void;
|
|
48
|
-
destroy(error?: Error):
|
|
48
|
+
destroy(error?: Error): this;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Event emitter
|
|
@@ -154,12 +154,12 @@ declare module 'stream' {
|
|
|
154
154
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
|
155
155
|
write(chunk: any, encoding: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
|
156
156
|
setDefaultEncoding(encoding: BufferEncoding): this;
|
|
157
|
-
end(cb?: () => void):
|
|
158
|
-
end(chunk: any, cb?: () => void):
|
|
159
|
-
end(chunk: any, encoding: BufferEncoding, cb?: () => void):
|
|
157
|
+
end(cb?: () => void): this;
|
|
158
|
+
end(chunk: any, cb?: () => void): this;
|
|
159
|
+
end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
|
|
160
160
|
cork(): void;
|
|
161
161
|
uncork(): void;
|
|
162
|
-
destroy(error?: Error):
|
|
162
|
+
destroy(error?: Error): this;
|
|
163
163
|
|
|
164
164
|
/**
|
|
165
165
|
* Event emitter
|
|
@@ -260,9 +260,9 @@ declare module 'stream' {
|
|
|
260
260
|
write(chunk: any, encoding?: BufferEncoding, cb?: (error: Error | null | undefined) => void): boolean;
|
|
261
261
|
write(chunk: any, cb?: (error: Error | null | undefined) => void): boolean;
|
|
262
262
|
setDefaultEncoding(encoding: BufferEncoding): this;
|
|
263
|
-
end(cb?: () => void):
|
|
264
|
-
end(chunk: any, cb?: () => void):
|
|
265
|
-
end(chunk: any, encoding?: BufferEncoding, cb?: () => void):
|
|
263
|
+
end(cb?: () => void): this;
|
|
264
|
+
end(chunk: any, cb?: () => void): this;
|
|
265
|
+
end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
|
|
266
266
|
cork(): void;
|
|
267
267
|
uncork(): void;
|
|
268
268
|
}
|