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:
parent
14af4539f5
commit
363be16fd9
11 changed files with 590 additions and 12 deletions
26
types/store.d.ts
vendored
Normal file
26
types/store.d.ts
vendored
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue