1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| import { AxiosRequestConfig } from "axios";
export interface APIGenerate { head<T>(url: string, params: any, config?: AxiosRequestConfig): T; get<T>(url: string, params: any, config?: AxiosRequestConfig): T; patch<T>(url: string, params: any, config?: AxiosRequestConfig): T; post<T>(url: string, params: any, config?: AxiosRequestConfig): T; put<T>(url: string, params: any, config?: AxiosRequestConfig): T; delete<T>(url: string, params: any, config?: AxiosRequestConfig): T; }
export class API implements APIGenerate { head<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } get<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } patch<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } post<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } put<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } delete<T>(url: string, params: any, config?: AxiosRequestConfig): T { throw new Error("Method not implemented."); } }
export default new API();
|