@types/node 16.7.3 → 16.7.4
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/index.d.ts +1 -0
- node/package.json +2 -2
- node/stream/consumers.d.ts +25 -0
- node/stream.d.ts +2 -0
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://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: Fri, 27 Aug 2021
|
|
11
|
+
* Last updated: Fri, 27 Aug 2021 18:31:21 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node/index.d.ts
CHANGED
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
/// <reference path="repl.d.ts" />
|
|
114
114
|
/// <reference path="stream.d.ts" />
|
|
115
115
|
/// <reference path="stream/promises.d.ts" />
|
|
116
|
+
/// <reference path="stream/consumers.d.ts" />
|
|
116
117
|
/// <reference path="stream/web.d.ts" />
|
|
117
118
|
/// <reference path="string_decoder.d.ts" />
|
|
118
119
|
/// <reference path="timers.d.ts" />
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.4",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -230,6 +230,6 @@
|
|
|
230
230
|
},
|
|
231
231
|
"scripts": {},
|
|
232
232
|
"dependencies": {},
|
|
233
|
-
"typesPublisherContentHash": "
|
|
233
|
+
"typesPublisherContentHash": "648f940c27be6330c253b8572452c11333ea8e77ecb5b8e4eeba1f4447928eb4",
|
|
234
234
|
"typeScriptVersion": "3.7"
|
|
235
235
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Duplicates of interface in lib.dom.ts.
|
|
2
|
+
// Duplicated here rather than referencing lib.dom.ts because doing so causes lib.dom.ts to be loaded for "test-all"
|
|
3
|
+
// Which in turn causes tests to pass that shouldn't pass.
|
|
4
|
+
//
|
|
5
|
+
// This interface is not, and should not be, exported.
|
|
6
|
+
interface Blob {
|
|
7
|
+
readonly size: number;
|
|
8
|
+
readonly type: string;
|
|
9
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
10
|
+
slice(start?: number, end?: number, contentType?: string): Blob;
|
|
11
|
+
stream(): NodeJS.ReadableStream;
|
|
12
|
+
text(): Promise<string>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare module 'stream/consumers' {
|
|
16
|
+
import { Readable } from 'node:stream';
|
|
17
|
+
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
|
|
18
|
+
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
|
|
19
|
+
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
|
|
20
|
+
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
|
|
21
|
+
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
|
|
22
|
+
}
|
|
23
|
+
declare module 'node:stream/consumers' {
|
|
24
|
+
export * from 'stream/consumers';
|
|
25
|
+
}
|
node/stream.d.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
21
21
|
import * as streamPromises from 'node:stream/promises';
|
|
22
|
+
import * as streamConsumers from 'node:stream/consumers';
|
|
22
23
|
class internal extends EventEmitter {
|
|
23
24
|
pipe<T extends NodeJS.WritableStream>(
|
|
24
25
|
destination: T,
|
|
@@ -1169,6 +1170,7 @@ declare module 'stream' {
|
|
|
1169
1170
|
unref(): void;
|
|
1170
1171
|
}
|
|
1171
1172
|
const promises: typeof streamPromises;
|
|
1173
|
+
const consumers: typeof streamConsumers;
|
|
1172
1174
|
}
|
|
1173
1175
|
export = internal;
|
|
1174
1176
|
}
|