UNPKG

arcx

Version:

A lightweight, dependency-free fetch utility for APIs and React.

20 lines 683 B
/** * Possible response parse methods. */ export type ParseType = "json" | "text" | "blob" | "arrayBuffer"; /** Additional ArcX-specific options. */ export interface FetchOptions extends RequestInit { queryParams?: Record<string, string | number | boolean>; timeout?: number; retries?: number; parseAs?: ParseType; } /** * A typed fetch request with retries, timeouts, interceptors, etc. * * @template T - The shape of the final parsed response. * @param url - Endpoint path * @param options - Additional ArcX fetch options */ export declare function fetchRequest<T>(url: string, options?: FetchOptions): Promise<T>; //# sourceMappingURL=fetchRequest.d.ts.map