Added the definition of the "axios-cancel" package

This commit is contained in:
TheDSCPL 2019-04-10 17:42:10 +01:00 committed by Luis
parent 61cb4635e6
commit e1a37a8340

View File

@ -8,13 +8,22 @@ import {AxiosStatic} from "axios";
declare module 'axios' {
export interface AxiosRequestConfig {
requestId?: string;
}
requestId?: string
};
export interface AxiosStatic {
cancel: (requestId: string) => void;
cancelAll: () => void;
}
}
declare function axiosCancel(a: AxiosStatic): void;
interface AxiosCancelOptions {
/**
* Enables logging
* default: false
*/
debug: boolean
}
declare function axiosCancel(axiosStatic: AxiosStatic, options?: AxiosCancelOptions): void;
export default axiosCancel;