From 4fd9b8f2b5a98bfcde57970b48fed2488a80f356 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 17 Sep 2021 21:53:37 +0300 Subject: add in master snapshot of epubjs --- lib/epub.js/types/store.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lib/epub.js/types/store.d.ts (limited to 'lib/epub.js/types/store.d.ts') 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>; + + put(url: string, withCredentials?: boolean, headers?: object): Promise; + + request(url: string, type?: string, withCredentials?: boolean, headers?: object): Promise; + + retrieve(url: string, type?: string): Promise; + + getBlob(url: string, mimeType?: string): Promise; + + getText(url: string): Promise; + + getBase64(url: string, mimeType?: string): Promise; + + createUrl(url: string, options: { base64: boolean }): Promise; + + revokeUrl(url: string): void; + + destroy(): void; + + private checkRequirements(): void; + + private handleResponse(response: any, type?: string): Blob | string | JSON | Document | XMLDocument; +} -- cgit v1.2.3