@types/node 16.7.3 → 16.7.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/README.md +2 -2
- node/child_process.d.ts +1 -1
- node/fs.d.ts +2 -2
- node/http2.d.ts +1 -1
- node/index.d.ts +1 -1
- node/package.json +2 -7
- node/stream/consumers.d.ts +24 -0
- node/stream.d.ts +2 -0
- node/url.d.ts +1 -1
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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:
|
|
11
|
+
* Last updated: Mon, 30 Aug 2021 16:01:20 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [
|
|
16
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), and [Linus Unnebäck](https://github.com/LinusU).
|
node/child_process.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ declare module 'child_process' {
|
|
|
70
70
|
import { URL } from 'node:url';
|
|
71
71
|
type Serializable = string | object | number | boolean | bigint;
|
|
72
72
|
type SendHandle = net.Socket | net.Server;
|
|
73
|
-
|
|
73
|
+
class ChildProcess extends EventEmitter {
|
|
74
74
|
/**
|
|
75
75
|
* A `Writable Stream` that represents the child process's `stdin`.
|
|
76
76
|
*
|
node/fs.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ declare module 'fs' {
|
|
|
188
188
|
/**
|
|
189
189
|
* A class representing a directory stream.
|
|
190
190
|
*
|
|
191
|
-
* Created by {@link opendir}, {@link opendirSync}, or
|
|
191
|
+
* Created by {@link opendir}, {@link opendirSync}, or `fsPromises.opendir()`.
|
|
192
192
|
*
|
|
193
193
|
* ```js
|
|
194
194
|
* import { opendir } from 'fs/promises';
|
|
@@ -208,7 +208,7 @@ declare module 'fs' {
|
|
|
208
208
|
*/
|
|
209
209
|
export class Dir implements AsyncIterable<Dirent> {
|
|
210
210
|
/**
|
|
211
|
-
* The read-only path of this directory as was provided to {@link opendir},
|
|
211
|
+
* The read-only path of this directory as was provided to {@link opendir},{@link opendirSync}, or `fsPromises.opendir()`.
|
|
212
212
|
* @since v12.12.0
|
|
213
213
|
*/
|
|
214
214
|
readonly path: string;
|
node/http2.d.ts
CHANGED
|
@@ -1714,7 +1714,7 @@ declare module 'http2' {
|
|
|
1714
1714
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
|
|
1715
1715
|
writeHead(statusCode: number, statusMessage: string, headers?: OutgoingHttpHeaders): this;
|
|
1716
1716
|
/**
|
|
1717
|
-
* Call
|
|
1717
|
+
* Call `http2stream.pushStream()` with the given headers, and wrap the
|
|
1718
1718
|
* given `Http2Stream` on a newly created `Http2ServerResponse` as the callback
|
|
1719
1719
|
* parameter if successful. When `Http2ServerRequest` is closed, the callback is
|
|
1720
1720
|
* called with an error `ERR_HTTP2_INVALID_STREAM`.
|
node/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
// Deividas Bakanas <https://github.com/DeividasBakanas>
|
|
12
12
|
// Eugene Y. Q. Shen <https://github.com/eyqs>
|
|
13
13
|
// Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
|
14
|
-
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
|
15
14
|
// Huw <https://github.com/hoo29>
|
|
16
15
|
// Kelvin Jin <https://github.com/kjin>
|
|
17
16
|
// Klaus Meinhardt <https://github.com/ajafff>
|
|
@@ -113,6 +112,7 @@
|
|
|
113
112
|
/// <reference path="repl.d.ts" />
|
|
114
113
|
/// <reference path="stream.d.ts" />
|
|
115
114
|
/// <reference path="stream/promises.d.ts" />
|
|
115
|
+
/// <reference path="stream/consumers.d.ts" />
|
|
116
116
|
/// <reference path="stream/web.d.ts" />
|
|
117
117
|
/// <reference path="string_decoder.d.ts" />
|
|
118
118
|
/// <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.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",
|
|
@@ -60,11 +60,6 @@
|
|
|
60
60
|
"url": "https://github.com/Hannes-Magnusson-CK",
|
|
61
61
|
"githubUsername": "Hannes-Magnusson-CK"
|
|
62
62
|
},
|
|
63
|
-
{
|
|
64
|
-
"name": "Hoàng Văn Khải",
|
|
65
|
-
"url": "https://github.com/KSXGitHub",
|
|
66
|
-
"githubUsername": "KSXGitHub"
|
|
67
|
-
},
|
|
68
63
|
{
|
|
69
64
|
"name": "Huw",
|
|
70
65
|
"url": "https://github.com/hoo29",
|
|
@@ -230,6 +225,6 @@
|
|
|
230
225
|
},
|
|
231
226
|
"scripts": {},
|
|
232
227
|
"dependencies": {},
|
|
233
|
-
"typesPublisherContentHash": "
|
|
228
|
+
"typesPublisherContentHash": "40cd69fb3bceaf604e21a748719f9c7f10f61cd4c4bdfe167f1d2c862fba6070",
|
|
234
229
|
"typeScriptVersion": "3.7"
|
|
235
230
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
declare module 'stream/consumers' {
|
|
15
|
+
import { Readable } from 'node:stream';
|
|
16
|
+
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
|
|
17
|
+
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
|
|
18
|
+
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
|
|
19
|
+
function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Blob>;
|
|
20
|
+
function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
|
|
21
|
+
}
|
|
22
|
+
declare module 'node:stream/consumers' {
|
|
23
|
+
export * from 'stream/consumers';
|
|
24
|
+
}
|
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
|
}
|
node/url.d.ts
CHANGED
|
@@ -697,7 +697,7 @@ declare module 'url' {
|
|
|
697
697
|
* Returns an ES6 `Iterator` over each of the name-value pairs in the query.
|
|
698
698
|
* Each item of the iterator is a JavaScript `Array`. The first item of the `Array`is the `name`, the second item of the `Array` is the `value`.
|
|
699
699
|
*
|
|
700
|
-
* Alias for
|
|
700
|
+
* Alias for `urlSearchParams[@@iterator]()`.
|
|
701
701
|
*/
|
|
702
702
|
entries(): IterableIterator<[string, string]>;
|
|
703
703
|
/**
|