diff options
author | Andrew Dolgov <[email protected]> | 2021-09-17 21:53:37 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-09-17 21:53:37 +0300 |
commit | 4fd9b8f2b5a98bfcde57970b48fed2488a80f356 (patch) | |
tree | 51e0ce9cd61c24916b7d5820ee69e74bd3e76aac /lib/epub.js/types/store.d.ts | |
parent | d0cd10f08286be33306336fe8c4cac26ea7ce637 (diff) |
add in master snapshot of epubjs
Diffstat (limited to 'lib/epub.js/types/store.d.ts')
-rw-r--r-- | lib/epub.js/types/store.d.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/epub.js/types/store.d.ts b/lib/epub.js/types/store.d.ts new file mode 100644 index 0000000..655a17d --- /dev/null +++ b/lib/epub.js/types/store.d.ts @@ -0,0 +1,30 @@ +import localForage = require('localforage'); +import Resources from "./resources"; + +export default class Store { + constructor(name: string, request?: Function, resolver?: Function); + + add(resources: Resources, force?: boolean): Promise<Array<object>>; + + put(url: string, withCredentials?: boolean, headers?: object): Promise<Blob>; + + request(url: string, type?: string, withCredentials?: boolean, headers?: object): Promise<Blob | string | JSON | Document | XMLDocument>; + + retrieve(url: string, type?: string): 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; +} |