Skip to content

Commit 13b5a0d

Browse files
authored
reuse Blob definition from buffer module
1 parent 1689cd3 commit 13b5a0d

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

types/node/stream/consumers.d.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
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-
text(): Promise<string>;
12-
}
131
declare module 'stream/consumers' {
142
import { Readable } from 'node:stream';
3+
import { Blob } from 'buffer';
154
function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
165
function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
176
function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;

0 commit comments

Comments
 (0)