1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Add Storage

This commit is contained in:
Fred Chasen 2018-10-28 22:31:24 -07:00
parent 14af4539f5
commit 363be16fd9
11 changed files with 590 additions and 12 deletions

26
types/store.d.ts vendored Normal file
View file

@ -0,0 +1,26 @@
import localForage = require('localforage');
import Resources from "./resources";
export default class Store {
constructor();
add(resources: Resources, force?: boolean): Promise<Array<object>>;
request(url: string, type?: string, withCredentials?: boolean, headers?: object): Promise<Blob | string | JSON | Document | XMLDocument>;
getBlob(url: string, mimeType?: string): Promise<Blob>;
getText(url: string): Promise<string>;
getBase64(url: string, mimeType?: string): Promise<string>;
createUrl(url: string, options: { base64: boolean }): Promise<string>;
revokeUrl(url: string): void;
destroy(): void;
private checkRequirements(): void;
private handleResponse(response: any, type?: string): Blob | string | JSON | Document | XMLDocument;
}