import type { Callback } from '../types/callback';
import type { Cancelable } from '../types/cancelable';
export interface IResourceType {
    Unknown: keyof this;
    Style: keyof this;
    Source: keyof this;
    Tile: keyof this;
    Glyphs: keyof this;
    SpriteImage: keyof this;
    SpriteJSON: keyof this;
    Image: keyof this;
}
/**
 * The type of a resource.
 * @private
 * @readonly
 * @enum {string}
 */
declare const ResourceType: IResourceType;
export { ResourceType };
/**
 * A `RequestParameters` object to be returned from Map.options.transformRequest callbacks.
 * @typedef {Object} RequestParameters
 * @property {string} url The URL to be requested.
 * @property {Object} headers The headers to be sent with the request.
 * @property {string} method Request method `'GET' | 'POST' | 'PUT'`.
 * @property {string} body Request body.
 * @property {string} type Response body type to be returned `'string' | 'json' | 'arrayBuffer'`.
 * @property {string} credentials `'same-origin'|'include'` Use 'include' to send cookies with cross-origin requests.
 * @property {boolean} collectResourceTiming If true, Resource Timing API information will be collected for these transformed requests and returned in a resourceTiming property of relevant data events.
 * @example
 * // use transformRequest to modify requests that begin with `http://myHost`
 * transformRequest: function(url, resourceType) {
 *  if (resourceType === 'Source' && url.indexOf('http://myHost') > -1) {
 *    return {
 *      url: url.replace('http', 'https'),
 *      headers: { 'my-custom-header': true },
 *      credentials: 'include'  // Include cookies for cross-origin requests
 *    }
 *   }
 *  }
 *
 */
export declare type RequestParameters = {
    url: string;
    headers?: any;
    method?: 'GET' | 'POST' | 'PUT';
    body?: string;
    type?: 'string' | 'json' | 'arrayBuffer';
    credentials?: 'same-origin' | 'include';
    collectResourceTiming?: boolean;
};
export declare type ResponseCallback<T> = (error?: Error | null, data?: T | null, cacheControl?: string | null, expires?: string | null) => void;
export declare const getReferrer: () => any;
export declare const makeRequest: (requestParameters: RequestParameters, callback: ResponseCallback<any>) => Cancelable;
export declare const getJSON: (requestParameters: RequestParameters, callback: ResponseCallback<any>) => Cancelable;
export declare const getArrayBuffer: (requestParameters: RequestParameters, callback: ResponseCallback<ArrayBuffer>) => Cancelable;
export declare const postData: (requestParameters: RequestParameters, callback: ResponseCallback<string>) => Cancelable;
export declare const resetImageRequestQueue: () => void;
export declare const getImage: (requestParameters: RequestParameters, callback: Callback<HTMLImageElement | ImageBitmap>) => Cancelable;
export declare const getVideo: (urls: Array<string>, callback: Callback<HTMLVideoElement>) => Cancelable;
//# sourceMappingURL=ajax.d.ts.map