UNPKG

@piarre/ts-freebox

Version:

10 lines (7 loc) 592 B
import { Response } from '../@types/index.mjs'; type options<T = object> = Omit<RequestInit, "body" | "method"> & { body?: T; }; declare const fetchFBX: <T = any, TBody = object>(url: string | URL | globalThis.Request, token: string, method: "GET" | "POST" | "PUT" | "DELETE" | string, options?: options<TBody>) => Promise<Response<T>>; declare const request: <T = any, TBody = object>(url: string | URL | globalThis.Request, token: string, options?: options<TBody>, method?: "GET" | "POST" | "PUT" | "DELETE") => Promise<Response<T>>; export { request as default, fetchFBX, request };