/// <reference path="module.d.ts" />
/// <reference path="module-scope.d.ts" />
declare let ModuleScopeClass: typeof ModuleScope;
/**
 * Ajax module
 * Usful to create Ajax XHR requests.
 * @param {Ajax} Ajax this module
 * @returns {Ajax}
 */
declare class Ajax extends ModuleScopeClass {
    constructor();
    /**
     * Creates an XHR Put request.
     * @static
     * @param {string} url string URL
     * @param {any} data Any type of data, mostly json object
     * @param {Function} onSuccess Optional, success callback function
     * @param {Function} onFail Optional, fail callback function
     * @returns {Promise<T>} Promise with data
     */
    put<T = any>(url: string, data: any, onSuccess?: Function, onFail?: Function): Promise<T>;
    /**
     * Creates an XHR Get request.
     * @static
     * @param {string} url string URL
     * @param {Function} onSuccess Optional, success callback function
     * @param {Function} onFail Optional, fail callback function
     * @returns {Promise<T>} Promise with data
     */
    get<T = any>(url: string, onSuccess?: Function, onFail?: Function): Promise<T>;
    /**
     * Creates an XHR Post request.
     * @static
     * @param {String} url string URL
     * @param {any} data Any type of data, mostly json object
     * @param {Function} onSuccess Optional, success callback function
     * @param {Function} onFail Optional, fail callback function
     * @returns {Promise<T>} Promise with data
     */
    post<T = any>(url: string, data: any, onSuccess?: Function, onFail?: Function): Promise<T>;
}
declare var require: (...args: any[]) => any;
