import {AxiosRequestConfig, AxiosResponse, CancelTokenStatic} from "axios"; declare interface CommonFunction { (): void } declare interface BeforeSendFunction { (config: AxiosRequestConfig): AxiosRequestConfig } declare interface DataFilterFunction { (response: AxiosResponse): AxiosResponse } declare interface ResponseErrorFunction { (error: any, transitive: any[]): any[] | undefined | null } declare interface AjaxOption extends AxiosRequestConfig{ formData?: boolean, security?: { crypto: boolean }, beforeSend?: BeforeSendFunction[], dataFilter?: DataFilterFunction[], responseError?: ResponseErrorFunction[], success?: DataFilterFunction, error?: ResponseErrorFunction, complete?: CommonFunction } export class Ajax { request> (config: AxiosRequestConfig): Promise; get>(url: string, config?: AxiosRequestConfig): Promise; delete>(url: string, config?: AxiosRequestConfig): Promise; head>(url: string, config?: AxiosRequestConfig): Promise; options>(url: string, config?: AxiosRequestConfig): Promise; post>(url: string, data?: any, config?: AxiosRequestConfig): Promise; put>(url: string, data?: any, config?: AxiosRequestConfig): Promise; patch>(url: string, data?: any, config?: AxiosRequestConfig): Promise; all(values: (T | Promise)[]): Promise; getCancelToken(): CancelTokenStatic create(config?: AjaxOption): Ajax } export default function init(config?: AjaxOption): Ajax;