import { type Fetch } from "./builtin-types.js"; import { type ReadableStream } from "./shim-types.js"; /** * A minimal copy of the `Agent` type from `undici-types` so we can * use it in the `ClientOptions` type. * * https://nodejs.org/api/http.html#class-httpagent */ export interface Agent { dispatch(options: any, handler: any): boolean; closed: boolean; destroyed: boolean; } 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 {}; //# sourceMappingURL=shims.d.ts.map