From 73169f06dff767020718a5715eba97d3575ba7e1 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 24 Feb 2024 23:47:57 -0500 Subject: Turn on @typescript-eslint/no-unsafe-argument (#728) --- ext/js/background/backend.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ext/js/background') diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 03c0b5fe..79023ac9 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -349,12 +349,18 @@ export class Backend { _onWebExtensionEventWrapper(handler) { return /** @type {T} */ ((...args) => { if (this._isPrepared) { + // This is using SafeAny to just forward the parameters + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument handler(...args); return; } this._prepareCompletePromise.then( - () => { handler(...args); }, + () => { + // This is using SafeAny to just forward the parameters + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + handler(...args); + }, () => {} // NOP ); }); -- cgit v1.2.3