From 91ddbc711412836b51cbb277931fed8db1d96088 Mon Sep 17 00:00:00 2001 From: jamesmaa Date: Mon, 16 Dec 2024 11:23:28 -0800 Subject: [PATCH] Fix some types --- ext/js/comm/anki-connect.js | 2 -- types/ext/core.d.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/js/comm/anki-connect.js b/ext/js/comm/anki-connect.js index aa870f67e..468321a8c 100644 --- a/ext/js/comm/anki-connect.js +++ b/ext/js/comm/anki-connect.js @@ -479,9 +479,7 @@ export class AnkiConnect { if (typeof result === 'object' && result !== null && !Array.isArray(result)) { const apiError = /** @type {import('core').SerializableObject} */ (result).error; if (typeof apiError !== 'undefined') { - // eslint-disable-next-line @typescript-eslint/no-base-to-string const error = new ExtensionError(`Anki error: ${apiError}`); - // eslint-disable-next-line @typescript-eslint/no-base-to-string error.data = {action, params, status: response.status, apiError: typeof apiError === 'string' ? apiError : `${apiError}`}; throw error; } diff --git a/types/ext/core.d.ts b/types/ext/core.d.ts index a550e0253..459ede99a 100644 --- a/types/ext/core.d.ts +++ b/types/ext/core.d.ts @@ -22,7 +22,7 @@ export type TypeofResult = 'string' | 'number' | 'bigint' | 'boolean' | 'symbol' export type SafeAny = any; /** This type is used as an explicit way of permitting the `Function` type. */ -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type +// eslint-disable-next-line @typescript-eslint/ban-types, @typescript-eslint/no-unsafe-function-type export type SafeFunction = Function; /** This type is used as an explicit way of permitting the `any` type. */