interface ResponseError extends Error { response?: Response; } export type { ResponseError }; /** * Ajax helper (use Promise instead of callbacks) * with help from: https://eckertalex.dev/blog/typescript-fetch-wrapper * "trust-the-server" typing */ declare class AjaxP { ajax_(url: string, opts: RequestInit, handleResponseJson?: boolean): Promise; toQueryString(obj?: Record): string; buildFullUrl(url: string, data?: Record): string; getJSON(url: string, data?: Record, opts?: RequestInit): Promise; postJSON(url: string, data: T, additionalHeaders?: Record): Promise; putJSON(url: string, data: T, additionalHeaders?: Record): Promise; deleteRequest(url: string, additionalHeaders: Record): Promise; } declare const ajaxP: AjaxP; export default ajaxP;