马宇豪
2024-08-29 893ff90c6e21fa3a5241a8ae9b33836037cd5912
1
2
3
4
5
6
7
8
9
10
11
12
declare module 'stream/consumers' {
    import { Blob as NodeBlob } from 'node:buffer';
    import { Readable } from 'node:stream';
    function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;
    function text(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<string>;
    function arrayBuffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<ArrayBuffer>;
    function blob(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<NodeBlob>;
    function json(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<unknown>;
}
declare module 'node:stream/consumers' {
    export * from 'stream/consumers';
}