UNPKG

415 BTypeScriptView Raw
1import 'isomorphic-fetch';
2export interface DefaultApiResponse {
3 [key: string]: any;
4}
5/**
6 * Low-level method that makes fetch requests, returning the response formatted as JSON.
7 * It parses errors from API v3 and throws exceptions with those errors
8 */
9declare const jsonRequest: <TResponseType = DefaultApiResponse>(url: string, options?: RequestInit) => Promise<TResponseType>;
10export default jsonRequest;