/** * Fetch wrapper for grabbing binary content * Replacement for grab-url package using standard fetch API */ export interface GrabOptions { responseType?: "text" | "arraybuffer"; /** Timeout in seconds */ timeout?: number; method?: string; headers?: Record; body?: string; } export default function grab(url: string, options?: GrabOptions & { responseType?: "text"; }): Promise; export default function grab(url: string, options: GrabOptions & { responseType: "arraybuffer"; }): Promise;