import { type Fetch } from "./builtin-types.js"; import { type ReadableStream } from "./shim-types.js"; export declare function getDefaultFetch(): Fetch; /** * A minimal copy of the NodeJS `stream.Readable` class so that we can * accept the NodeJS types in certain places, e.g. file uploads * * https://nodejs.org/api/stream.html#class-streamreadable */ export interface ReadableLike { readable: boolean; readonly readableEnded: boolean; readonly readableFlowing: boolean | null; readonly readableHighWaterMark: number; readonly readableLength: number; readonly readableObjectMode: boolean; destroyed: boolean; read(size?: number): any; pause(): this; resume(): this; isPaused(): boolean; destroy(error?: Error): this; [Symbol.asyncIterator](): AsyncIterableIterator; } /** * Determines if the given value looks like a NodeJS `stream.Readable` * object and that it is readable, i.e. has not been consumed. * * https://nodejs.org/api/stream.html#class-streamreadable */ export declare function isReadableLike(value: any): boolean; /** * A minimal copy of the NodeJS `fs.ReadStream` class for usage within file uploads. * * https://nodejs.org/api/fs.html#class-fsreadstream */ export interface FsReadStreamLike extends ReadableLike { path: {}; } /** * Determines if the given value looks like a NodeJS `fs.ReadStream` * object. * * This just checks if the object matches our `Readable` interface * and defines a `path` property, there may be false positives. * * https://nodejs.org/api/fs.html#class-fsreadstream */ export declare function isFsReadStreamLike(value: any): value is FsReadStreamLike; type ReadableStreamArgs = ConstructorParameters; export declare function makeReadableStream(...args: ReadableStreamArgs): ReadableStream; export declare function ReadableStreamFrom(iterable: Iterable | AsyncIterable): ReadableStream; /** * Most browsers don't yet have async iterable support for ReadableStream, * and Node has a very different way of reading bytes from its "ReadableStream". * * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 */ export declare function ReadableStreamToAsyncIterable(stream: any): AsyncIterableIterator; export {}; //# sourceMappingURL=shims.d.ts.map