aboutsummaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-12-20 00:44:42 -0500
committerGitHub <noreply@github.com>2023-12-20 05:44:42 +0000
commit86f92ba00efdfa0feaa889c2188068dc6d8b457b (patch)
treec705fafdad4ad2087c3a9c4cfdff041381017085 /ext/js
parentad94a56e573553f3c66e8fcccff3042544faeb1b (diff)
Fix some missing types (#403)
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/background/backend.js4
-rw-r--r--ext/js/pages/settings/backup-controller.js14
2 files changed, 6 insertions, 12 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index c3de6fc7..99aa0c5d 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -55,9 +55,7 @@ export class Backend {
this._japaneseUtil = new JapaneseUtil(wanakana);
/** @type {Environment} */
this._environment = new Environment();
- /**
- *
- */
+ /** @type {AnkiConnect} */
this._anki = new AnkiConnect();
/** @type {Mecab} */
this._mecab = new Mecab();
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index c539bdfe..c0e56e96 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -50,13 +50,9 @@ export class BackupController {
/** @type {?OptionsUtil} */
this._optionsUtil = null;
- /**
- *
- */
+ /** @type {string} */
this._dictionariesDatabaseName = 'dict';
- /**
- *
- */
+ /** @type {?import('core').TokenObject} */
this._settingsExportDatabaseToken = null;
try {
@@ -586,9 +582,7 @@ export class BackupController {
return blob;
}
- /**
- *
- */
+ /** */
async _onSettingsExportDatabaseClick() {
if (this._settingsExportDatabaseToken !== null) {
// An existing import or export is in progress.
@@ -603,6 +597,7 @@ export class BackupController {
const date = new Date(Date.now());
const pageExitPrevention = this._settingsController.preventPageExit();
try {
+ /** @type {import('core').TokenObject} */
const token = {};
this._settingsExportDatabaseToken = token;
const fileName = `yomitan-dictionaries-${this._getSettingsExportDateString(date, '-', '-', '-', 6)}.json`;
@@ -681,6 +676,7 @@ export class BackupController {
const file = files[0];
element.value = '';
try {
+ /** @type {import('core').TokenObject} */
const token = {};
this._settingsExportDatabaseToken = token;
await this._importDatabase(this._dictionariesDatabaseName, file);