export interface ILoadFileProgressEvent { total: number; loaded: number; } export type LoadFileResponseType = T extends "text" ? string : T extends "arraybuffer" ? ArrayBuffer : Blob; /** * Loads the file located at the given url and returns a promise with its content. The promise is rejected if an error occurs while loading the file. * @param url defines the url to load from * @param responseType defines the type of response expected ("text", "arraybuffer", or "blob") * @param progressCallback defines a callback to call when progress changes * @returns a promise with the loaded file content */ export declare function loadFile(url: string, responseType: T, progressCallback?: (data: ILoadFileProgressEvent) => void): Promise>; /** * Loads a JSON file from the given url and returns a promise with its content. The promise is rejected if an error occurs while loading the file or if the loaded content cannot be parsed as JSON. * @param url defines the url to load from * @param progressCallback defines a callback to call when progress changes * @returns a promise with the loaded JSON content */ export declare function loadJsonFile(url: string, progressCallback?: (data: ILoadFileProgressEvent) => void): Promise;