export class FileResponse { /** * Creates a new `FileResponse` object. * @param {string} filePath */ constructor(filePath: string); filePath: string; headers: Headers; exists: boolean; status: number; statusText: string; body: ReadableStream; /** * Updates the 'content-type' header property of the response based on the extension of * the file specified by the filePath property of the current object. * @returns {void} */ updateContentType(): void; /** * Clone the current FileResponse object. * @returns {FileResponse} A new FileResponse object with the same properties as the current object. */ clone(): FileResponse; /** * Reads the contents of the file specified by the filePath property and returns a Promise that * resolves with an ArrayBuffer containing the file's contents. * @returns {Promise} A Promise that resolves with an ArrayBuffer containing the file's contents. * @throws {Error} If the file cannot be read. */ arrayBuffer(): Promise; /** * Reads the contents of the file specified by the filePath property and returns a Promise that * resolves with a Blob containing the file's contents. * @returns {Promise} A Promise that resolves with a Blob containing the file's contents. * @throws {Error} If the file cannot be read. */ blob(): Promise; /** * Reads the contents of the file specified by the filePath property and returns a Promise that * resolves with a string containing the file's contents. * @returns {Promise} A Promise that resolves with a string containing the file's contents. * @throws {Error} If the file cannot be read. */ text(): Promise; /** * Reads the contents of the file specified by the filePath property and returns a Promise that * resolves with a parsed JavaScript object containing the file's contents. * * @returns {Promise} A Promise that resolves with a parsed JavaScript object containing the file's contents. * @throws {Error} If the file cannot be read. */ json(): Promise; } /** * File system cache implementation that implements the CacheInterface. * Provides `match` and `put` methods compatible with the Web Cache API. */ export class FileCache { /** * Instantiate a `FileCache` object. * @param {string} path */ constructor(path: string); path: string; /** * Checks whether the given request is in the cache. * @param {string} request * @returns {Promise} */ match(request: string): Promise; /** * Adds the given response to the cache. * @param {string} request * @param {Response} response * @param {(data: {progress: number, loaded: number, total: number}) => void} [progress_callback] Optional. * The function to call with progress updates * @returns {Promise} */ put(request: string, response: Response, progress_callback?: (data: { progress: number; loaded: number; total: number; }) => void): Promise; } //# sourceMappingURL=files.d.ts.map