about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.d.ts4
-rw-r--r--src/reader.ts4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/index.d.ts b/src/index.d.ts
index c83ae9b..78706ea 100644
--- a/src/index.d.ts
+++ b/src/index.d.ts
@@ -51,3 +51,7 @@ declare const BUILD_CACHE_VERSION: string;
 declare const BUILD_MANIFEST_ASSETS: [];
 
 declare const BUILD_VERSION: string;
+
+declare var hyphenationPatternsEnUs;
+declare var hyphenationPatternsRu;
+declare var createHyphenator;
diff --git a/src/reader.ts b/src/reader.ts
index ac8c316..dbd505b 100644
--- a/src/reader.ts
+++ b/src/reader.ts
@@ -1369,7 +1369,7 @@ class ReaderClass extends AppCommon {
             $(".header,.footer").fadeIn();
     }
 
-    async lookupWord(word: any, callback: any, elem: any) {
+    async lookupWord(word: any, callback: any, elem: any = null) {
         if (elem)
             word = $(elem).val();
 
@@ -1774,7 +1774,7 @@ class ReaderLoader {
         const cache = await caches.open(cacheName);
         const cacheKeys = await cache.keys();
 
-        const promises = [];
+        const promises: Promise<void>[] = [];
         let loadFailed = false;
 
         for (const req of cacheKeys) {