@types/node 18.8.4 → 18.8.5
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/buffer.d.ts +7 -2
- node/package.json +2 -2
- node/stream.d.ts +2 -2
- node/ts4.8/buffer.d.ts +8 -2
- node/ts4.8/stream.d.ts +2 -2
node/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.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 12 Oct 2022 19:33:14 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/buffer.d.ts
CHANGED
|
@@ -166,7 +166,11 @@ declare module 'buffer' {
|
|
|
166
166
|
export import atob = globalThis.atob;
|
|
167
167
|
export import btoa = globalThis.btoa;
|
|
168
168
|
|
|
169
|
-
import { Blob as
|
|
169
|
+
import { Blob as NodeBlob } from 'buffer';
|
|
170
|
+
// This conditional type will be the existing global Blob in a browser, or
|
|
171
|
+
// the copy below in a Node environment.
|
|
172
|
+
type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
|
|
173
|
+
? T : NodeBlob;
|
|
170
174
|
global {
|
|
171
175
|
// Buffer class
|
|
172
176
|
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
@@ -2235,6 +2239,7 @@ declare module 'buffer' {
|
|
|
2235
2239
|
*/
|
|
2236
2240
|
function btoa(data: string): string;
|
|
2237
2241
|
|
|
2242
|
+
interface Blob extends __Blob {}
|
|
2238
2243
|
/**
|
|
2239
2244
|
* `Blob` class is a global reference for `require('node:buffer').Blob`
|
|
2240
2245
|
* https://nodejs.org/api/buffer.html#class-blob
|
|
@@ -2245,7 +2250,7 @@ declare module 'buffer' {
|
|
|
2245
2250
|
Blob: infer T;
|
|
2246
2251
|
}
|
|
2247
2252
|
? T
|
|
2248
|
-
: typeof
|
|
2253
|
+
: typeof NodeBlob;
|
|
2249
2254
|
}
|
|
2250
2255
|
}
|
|
2251
2256
|
declare module 'node:buffer' {
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.8.
|
|
3
|
+
"version": "18.8.5",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
},
|
|
228
228
|
"scripts": {},
|
|
229
229
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
230
|
+
"typesPublisherContentHash": "11e7a0f3e5e6e91330935aff9d2f03e66b53af9f4638e4afd4c2b44d1be5c40b",
|
|
231
231
|
"typeScriptVersion": "4.1"
|
|
232
232
|
}
|
node/stream.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
21
|
-
import { Blob } from "node:buffer";
|
|
21
|
+
import { Blob as NodeBlob } from "node:buffer";
|
|
22
22
|
import * as streamPromises from 'node:stream/promises';
|
|
23
23
|
import * as streamConsumers from 'node:stream/consumers';
|
|
24
24
|
import * as streamWeb from 'node:stream/web';
|
|
@@ -893,7 +893,7 @@ declare module 'stream' {
|
|
|
893
893
|
*
|
|
894
894
|
* @since v16.8.0
|
|
895
895
|
*/
|
|
896
|
-
static from(src: Stream |
|
|
896
|
+
static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
|
|
897
897
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
898
898
|
_writev?(
|
|
899
899
|
chunks: Array<{
|
node/ts4.8/buffer.d.ts
CHANGED
|
@@ -166,7 +166,12 @@ declare module 'buffer' {
|
|
|
166
166
|
export import atob = globalThis.atob;
|
|
167
167
|
export import btoa = globalThis.btoa;
|
|
168
168
|
|
|
169
|
-
import { Blob as
|
|
169
|
+
import { Blob as NodeBlob } from 'buffer';
|
|
170
|
+
// This conditional type will be the existing global Blob in a browser, or
|
|
171
|
+
// the copy below in a Node environment.
|
|
172
|
+
type __Blob = typeof globalThis extends { onmessage: any, Blob: infer T }
|
|
173
|
+
? T : NodeBlob;
|
|
174
|
+
|
|
170
175
|
global {
|
|
171
176
|
// Buffer class
|
|
172
177
|
type BufferEncoding = 'ascii' | 'utf8' | 'utf-8' | 'utf16le' | 'ucs2' | 'ucs-2' | 'base64' | 'base64url' | 'latin1' | 'binary' | 'hex';
|
|
@@ -2235,6 +2240,7 @@ declare module 'buffer' {
|
|
|
2235
2240
|
*/
|
|
2236
2241
|
function btoa(data: string): string;
|
|
2237
2242
|
|
|
2243
|
+
interface Blob extends __Blob {}
|
|
2238
2244
|
/**
|
|
2239
2245
|
* `Blob` class is a global reference for `require('node:buffer').Blob`
|
|
2240
2246
|
* https://nodejs.org/api/buffer.html#class-blob
|
|
@@ -2245,7 +2251,7 @@ declare module 'buffer' {
|
|
|
2245
2251
|
Blob: infer T;
|
|
2246
2252
|
}
|
|
2247
2253
|
? T
|
|
2248
|
-
: typeof
|
|
2254
|
+
: typeof NodeBlob;
|
|
2249
2255
|
}
|
|
2250
2256
|
}
|
|
2251
2257
|
declare module 'node:buffer' {
|
node/ts4.8/stream.d.ts
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
declare module 'stream' {
|
|
20
20
|
import { EventEmitter, Abortable } from 'node:events';
|
|
21
|
-
import { Blob } from "node:buffer";
|
|
21
|
+
import { Blob as NodeBlob } from "node:buffer";
|
|
22
22
|
import * as streamPromises from 'node:stream/promises';
|
|
23
23
|
import * as streamConsumers from 'node:stream/consumers';
|
|
24
24
|
import * as streamWeb from 'node:stream/web';
|
|
@@ -893,7 +893,7 @@ declare module 'stream' {
|
|
|
893
893
|
*
|
|
894
894
|
* @since v16.8.0
|
|
895
895
|
*/
|
|
896
|
-
static from(src: Stream |
|
|
896
|
+
static from(src: Stream | NodeBlob | ArrayBuffer | string | Iterable<any> | AsyncIterable<any> | AsyncGeneratorFunction | Promise<any> | Object): Duplex;
|
|
897
897
|
_write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
898
898
|
_writev?(
|
|
899
899
|
chunks: Array<{
|