diff options
Diffstat (limited to 'ext/js/data')
-rw-r--r-- | ext/js/data/anki-note-builder.js | 1 | ||||
-rw-r--r-- | ext/js/data/database.js | 10 | ||||
-rw-r--r-- | ext/js/data/json-schema.js | 2 | ||||
-rw-r--r-- | ext/js/data/options-util.js | 2 |
4 files changed, 9 insertions, 6 deletions
diff --git a/ext/js/data/anki-note-builder.js b/ext/js/data/anki-note-builder.js index 6a6a6177..aec8cdd9 100644 --- a/ext/js/data/anki-note-builder.js +++ b/ext/js/data/anki-note-builder.js @@ -88,6 +88,7 @@ export class AnkiNoteBuilder { } const formattedFieldValues = await Promise.all(formattedFieldValuePromises); + /** @type {Map<string, import('anki-note-builder').Requirement>} */ const uniqueRequirements = new Map(); /** @type {import('anki').NoteFields} */ const noteFields = {}; diff --git a/ext/js/data/database.js b/ext/js/data/database.js index 7f37347b..a53c8ddb 100644 --- a/ext/js/data/database.js +++ b/ext/js/data/database.js @@ -194,10 +194,10 @@ export class Database { request.onsuccess = (e) => { const cursor = /** @type {IDBRequest<?IDBCursorWithValue>} */ (e.target).result; if (cursor) { - /** @type {TResult} */ + /** @type {unknown} */ const value = cursor.value; - if (noPredicate || predicate(value, predicateArg)) { - resolve(value, data); + if (noPredicate || predicate(/** @type {TResult} */ (value), predicateArg)) { + resolve(/** @type {TResult} */ (value), data); } else { cursor.continue(); } @@ -424,9 +424,9 @@ export class Database { request.onsuccess = (e) => { const cursor = /** @type {IDBRequest<?IDBCursorWithValue>} */ (e.target).result; if (cursor) { - /** @type {TResult} */ + /** @type {unknown} */ const value = cursor.value; - results.push(value); + results.push(/** @type {TResult} */ (value)); cursor.continue(); } else { onSuccess(results, data); diff --git a/ext/js/data/json-schema.js b/ext/js/data/json-schema.js index 9e1497e9..0a2b8d82 100644 --- a/ext/js/data/json-schema.js +++ b/ext/js/data/json-schema.js @@ -1263,7 +1263,7 @@ class JsonSchemaProxyHandler { /** * @param {import('ext/json-schema').ValueObjectOrArray} target * @param {string|number|symbol} property - * @param {import('core').SafeAny} value + * @param {unknown} value * @returns {boolean} * @throws {Error} */ diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index b6fb6686..ba404bc2 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -27,6 +27,7 @@ import {JsonSchema} from './json-schema.js'; // of the options object to a newer format. SafeAny is used for much of this, since every single // legacy format does not contain type definitions. /* eslint-disable @typescript-eslint/no-unsafe-argument */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ export class OptionsUtil { constructor() { @@ -1295,4 +1296,5 @@ export class OptionsUtil { } } +/* eslint-enable @typescript-eslint/no-unsafe-assignment */ /* eslint-enable @typescript-eslint/no-unsafe-argument */ |