summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 23:05:37 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 23:05:37 -0500
commitec67de5c0c4abc11232d3f3a8a8e9bb2fe045daa (patch)
treefa3b904556ddcb9f7248bc1628064755e072f8f5 /ext
parenta834a57a8a960b72190148f49ef52a6d9c8279e2 (diff)
Update library types
Diffstat (limited to 'ext')
-rw-r--r--ext/js/display/search-main.js4
-rw-r--r--ext/js/language/sandbox/japanese-util.js4
-rw-r--r--ext/js/templates/sandbox/template-renderer.js2
3 files changed, 4 insertions, 6 deletions
diff --git a/ext/js/display/search-main.js b/ext/js/display/search-main.js
index c20cc135..5eee08d1 100644
--- a/ext/js/display/search-main.js
+++ b/ext/js/display/search-main.js
@@ -44,9 +44,7 @@ import {SearchPersistentStateController} from './search-persistent-state-control
const {tabId, frameId} = await yomitan.api.frameInformationGet();
- /** @type {import('wanakana')} */
- const wanakanaLib = wanakana;
- const japaneseUtil = new JapaneseUtil(wanakanaLib);
+ const japaneseUtil = new JapaneseUtil(wanakana);
const hotkeyHandler = new HotkeyHandler();
hotkeyHandler.prepare();
diff --git a/ext/js/language/sandbox/japanese-util.js b/ext/js/language/sandbox/japanese-util.js
index 4c9c46bd..6f4fc8e0 100644
--- a/ext/js/language/sandbox/japanese-util.js
+++ b/ext/js/language/sandbox/japanese-util.js
@@ -233,11 +233,11 @@ function getProlongedHiragana(previousCharacter) {
export class JapaneseUtil {
/**
- * @param {?import('wanakana')} wanakana
+ * @param {?import('wanakana')|import('../../../lib/wanakana.js')} wanakana
*/
constructor(wanakana=null) {
/** @type {?import('wanakana')} */
- this._wanakana = wanakana;
+ this._wanakana = /** @type {import('wanakana')} */ (wanakana);
}
// Character code testing functions
diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js
index fe240b5f..239240b6 100644
--- a/ext/js/templates/sandbox/template-renderer.js
+++ b/ext/js/templates/sandbox/template-renderer.js
@@ -197,7 +197,7 @@ export class TemplateRenderer {
*/
function wrapper(...args) {
const argCountM1 = Math.max(0, args.length - 1);
- const options = /** @type {Handlebars.HelperOptions} */ (args[argCountM1]);
+ const options = /** @type {import('handlebars').HelperOptions} */ (args[argCountM1]);
args.length = argCountM1;
return helper(args, this, options);
}