aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/anki-note-builder.js4
-rw-r--r--ext/js/data/options-util.js7
-rw-r--r--ext/js/data/sandbox/anki-note-data-creator.js4
3 files changed, 11 insertions, 4 deletions
diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js
index 28809e1f..4920db39 100644
--- a/ext/js/data/anki-note-builder.js
+++ b/ext/js/data/anki-note-builder.js
@@ -24,10 +24,10 @@ import {AnkiUtil} from './anki-util.js';
export class AnkiNoteBuilder {
/**
- * @param {{japaneseUtil: JapaneseUtil}} details
+ * @param {{japaneseUtil: import('../language/sandbox/japanese-util.js').JapaneseUtil}} details
*/
constructor({japaneseUtil}) {
- /** @type {JapaneseUtil} */
+ /** @type {import('../language/sandbox/japanese-util.js').JapaneseUtil} */
this._japaneseUtil = japaneseUtil;
/** @type {RegExp} */
this._markerPattern = AnkiUtil.cloneFieldMarkerPattern(true);
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index e8723f1f..70c1622f 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -1144,6 +1144,9 @@ export class OptionsUtil {
return options;
}
+ /**
+ * @type {import('options-util').ModernUpdateFunctionAsync}
+ */
async _updateVersion21(options) {
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v21.handlebars');
@@ -1163,6 +1166,10 @@ export class OptionsUtil {
return options;
}
+ /**
+ * @param {string} url
+ * @returns {Promise<chrome.tabs.Tab>}
+ */
_createTab(url) {
return new Promise((resolve, reject) => {
chrome.tabs.create({url}, (tab) => {
diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js
index 821d4024..dce71938 100644
--- a/ext/js/data/sandbox/anki-note-data-creator.js
+++ b/ext/js/data/sandbox/anki-note-data-creator.js
@@ -25,10 +25,10 @@ import {DictionaryDataUtil} from '../../language/sandbox/dictionary-data-util.js
export class AnkiNoteDataCreator {
/**
* Creates a new instance.
- * @param {JapaneseUtil} japaneseUtil An instance of `JapaneseUtil`.
+ * @param {import('../../language/sandbox/japanese-util.js').JapaneseUtil} japaneseUtil An instance of `JapaneseUtil`.
*/
constructor(japaneseUtil) {
- /** @type {JapaneseUtil} */
+ /** @type {import('../../language/sandbox/japanese-util.js').JapaneseUtil} */
this._japaneseUtil = japaneseUtil;
}