import { T_el, T_fn, T_obj, T_sel } from "./ax";
export interface T_ajax {
    target?:T_sel;
    url?: string;
    type?: 'post' | 'get',
    async?: boolean;
    data?: string | FormData | T_obj;
    holdTime?: number;
    stopTime?: number;
    contType?: string;
    headers?: T_obj;
    respType?: string;
    catchable?: boolean;
    spinStr?: string;
    spinSel?:string|T_el;
    xhrName?:string;
    repeat?: { index?: number, max?: number, keyword?: string };
    xhrFields?: T_obj;
    abort?: (resp: T_resp) => void;
    timeout?: (resp: T_resp) => void;
    opened?: (resp: T_resp) => void;
    before?: (resp: T_resp) => void;
    success?: (resp: T_resp) => void;
    error?: (resp: T_resp) => void;
    downloading?: (resp: T_prog) => void;
    uploading?: (resp: T_prog) => void;
    complete?: (resp: T_prog) => void;
    cb?: (resp: T_prog) => void;
}
export interface T_resp {
    content: any,
    status: number,
    label:T_el,
    target: T_el,
    xhr: XMLHttpRequest,
    abort?:T_fn
}
export interface T_prog {
    current: number,
    result: string,
    percent: number,
    total: number,
    ratio: number,
    time: number,
    status: number,
    label:T_el,
    target: T_el,
    xhr: XMLHttpRequest,
    abort:T_fn,
}
