diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-27 15:16:07 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-27 15:16:07 -0500 |
commit | ac562ca36417f2d9fdb860d1f8a879fdccde438d (patch) | |
tree | f0d3efffed3651a42abfb05c5e3ea6f6fd6af7ae /ext/js/data | |
parent | 7aed9a371b0d74c0d75179a08068e8935b76d780 (diff) |
Update types
Diffstat (limited to 'ext/js/data')
-rw-r--r-- | ext/js/data/anki-note-builder.js | 4 | ||||
-rw-r--r-- | ext/js/data/options-util.js | 7 | ||||
-rw-r--r-- | ext/js/data/sandbox/anki-note-data-creator.js | 4 |
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; } |