about summary refs log tree commit diff stats
path: root/src/reader.ts
diff options
context:
space:
mode:
authorAndrew Dolgov <fox@fakecake.org>2026-06-26 23:52:06 +0300
committerAndrew Dolgov <fox@fakecake.org>2026-06-26 23:52:06 +0300
commit5fe9fbf8e5388c121964cc2ecaae34d92d12f632 (patch)
treef667ff5621c5ea881489b5d892aa24efc011f12b /src/reader.ts
parent6e5eca4961d293c01ea4f01ff5323dc137daad8f (diff)
downloadthe-epube-5fe9fbf8e5388c121964cc2ecaae34d92d12f632.tar.gz
the-epube-5fe9fbf8e5388c121964cc2ecaae34d92d12f632.tar.xz
more ts migration stuff
Diffstat (limited to 'src/reader.ts')
-rw-r--r--src/reader.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/reader.ts b/src/reader.ts
index 705aab0..ac8c316 100644
--- a/src/reader.ts
+++ b/src/reader.ts
@@ -251,7 +251,7 @@ class ReaderClass extends AppCommon {
 
         console.log('trying to load book...');
 
-        let book_data = await localforage.getItem(this.cacheId("book"));
+        let book_data = await localforage.getItem(this.cacheId("book")) as Blob;
 
         if (!book_data) {
             console.log("local data not found, loading from network...");
@@ -332,7 +332,7 @@ class ReaderClass extends AppCommon {
 
         if (enable_hyphens) {
             /* global hyphenationPatternsEnUs, hyphenationPatternsRu, createHyphenator */
-(this.hyphenate as any).en = createHyphenator(hyphenationPatternsEnUs, { html: true });
+            (this.hyphenate as any).en = createHyphenator(hyphenationPatternsEnUs, { html: true });
             (this.hyphenate as any).ru = createHyphenator(hyphenationPatternsRu, { html: true });
         }
 
@@ -352,7 +352,7 @@ class ReaderClass extends AppCommon {
      * @param {ePub.Book} book
      */
     async showBookInfo(book: any) {
-        const bookinfo = await localforage.getItem(this.cacheId());
+        const bookinfo = await localforage.getItem(this.cacheId()) as BookInfo;
 
         let title;
         let author;
@@ -602,7 +602,7 @@ class ReaderClass extends AppCommon {
     initModals() {
         $('#settings-modal').on('shown.bs.modal', async () => {
 
-            const last_read = await localforage.getItem(this.cacheId("lastread"));
+            const last_read = await localforage.getItem(this.cacheId("lastread")) as LastRead;
 
             if (last_read && last_read.cfi) {
                 $(".lastread_input")
@@ -1596,7 +1596,7 @@ class ReaderClass extends AppCommon {
 
         let location_found = false;
 
-        const lr_local = (await localforage.getItem(this.cacheId("lastread"))) || {};
+        const lr_local = ((await localforage.getItem(this.cacheId("lastread"))) || {}) as LastRead;
         console.log('got local lastread', lr_local);
 
         if (this.isOnline()) {