aboutsummaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js')
-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);
}