/** * Utility functions for handling fetch in different environments */ export interface FetchResponse { json(): Promise; text(): Promise; arrayBuffer(): Promise; body: ReadableStream; ok: boolean; status: number; statusText: string; headers: Headers; } export interface FetchOptions { method?: string; headers?: Record; body?: string | ArrayBuffer | Uint8Array; } export type FetchFunction = (url: string, options?: FetchOptions) => Promise; /** * Get a fetch implementation that works in both Node.js and browser environments * * This function tries to use: * 1. The global fetch if available (browsers and Node.js >= 18) * 2. node-fetch if installed (for older Node.js versions) * 3. Falls back to a mock implementation that throws an error * * @returns A fetch function that works in the current environment */ export declare function getFetch(): FetchFunction; /** * Check if fetch is available in the current environment * * @returns True if fetch is available, false otherwise */ export declare function isFetchAvailable(): boolean;