rittenhop-dev/versions/5.94.2/node_modules/readable-web-to-node-stream/lib/index.d.ts
2024-09-23 19:40:12 -04:00

40 lines
1.4 KiB
TypeScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Readable } from 'readable-stream';
/**
* Converts a Web-API stream into Node stream.Readable class
* Node stream readable: https://nodejs.org/api/stream.html#stream_readable_streams
* Web API readable-stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
* Node readable stream: https://nodejs.org/api/stream.html#stream_readable_streams
*/
export declare class ReadableWebToNodeStream extends Readable {
bytesRead: number;
released: boolean;
/**
* Default web API stream reader
* https://developer.mozilla.org/en-US/docs/Web/API/ReadableStreamDefaultReader
*/
private reader;
private pendingRead;
/**
*
* @param stream ReadableStream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
*/
constructor(stream: ReadableStream);
/**
* Implementation of readable._read(size).
* When readable._read() is called, if data is available from the resource,
* the implementation should begin pushing that data into the read queue
* https://nodejs.org/api/stream.html#stream_readable_read_size_1
*/
_read(): Promise<void>;
/**
* If there is no unresolved read call to Web-API ReadableStream immediately returns;
* otherwise will wait until the read is resolved.
*/
waitForReadToComplete(): Promise<void>;
/**
* Close wrapper
*/
close(): Promise<void>;
private syncAndRelease;
}