diff --git a/src/electron/electron-rec-preload.ts b/src/electron/electron-rec-preload.ts index 996103b5..6057d5fb 100644 --- a/src/electron/electron-rec-preload.ts +++ b/src/electron/electron-rec-preload.ts @@ -78,6 +78,7 @@ ipcRenderer.on("inc-sizes", (event, totalSize, writtenSize, collId) => { ipcRenderer.on("download-progress", (event, progress) => { // @ts-expect-error - TS7005 - Variable 'downloadCallback' implicitly has an 'any' type. if (downloadCallback) { +// @ts-expect-error - TS7005 - Variable 'downloadCallback' implicitly has an 'any' type. downloadCallback(progress); } }); diff --git a/src/electron/electron-recorder-app.ts b/src/electron/electron-recorder-app.ts index 0751da63..4d7af12f 100644 --- a/src/electron/electron-recorder-app.ts +++ b/src/electron/electron-recorder-app.ts @@ -144,7 +144,6 @@ class ElectronRecorderApp extends ElectronReplayApp { // @ts-expect-error - TS2339 - Property 'recorders' does not exist on type 'ElectronRecorderApp'. for (const rec of this.recorders.values()) { - // @ts-expect-error - TS2345 - Argument of type 'any' is not assignable to parameter of type 'never'. promises.push(rec.shutdownPromise); //rec.detach(); rec.recWindow.close(); diff --git a/src/ext/bg.ts b/src/ext/bg.ts index 584e22e9..1e85b415 100644 --- a/src/ext/bg.ts +++ b/src/ext/bg.ts @@ -70,11 +70,9 @@ function popupHandler(port) { switch (message.type) { case "startUpdates": tabId = message.tabId; - // @ts-expect-error - TS2538 - Type 'null' cannot be used as an index type. if (self.recorders[tabId]) { - // @ts-expect-error - TS2538 - Type 'null' cannot be used as an index type. + // @ts-expect-error - TS2339 - Property 'port' does not exist on type 'BrowserRecorder'. self.recorders[tabId].port = port; - // @ts-expect-error - TS2538 - Type 'null' cannot be used as an index type. self.recorders[tabId].doUpdateStatus(); } port.postMessage(await listAllMsg(collLoader)); @@ -141,7 +139,6 @@ chrome.tabs.onCreated.addListener((tab) => { // @ts-expect-error - TS7005 - Variable 'newRecUrl' implicitly has an 'any' type. if (newRecUrl && tab.pendingUrl === "about:blank") { start = true; - // @ts-expect-error - TS7005 - Variable 'newRecUrl' implicitly has an 'any' type. openUrl = newRecUrl; // @ts-expect-error - TS7005 - Variable 'newRecCollId' implicitly has an 'any' type. | TS7005 - Variable 'defaultCollId' implicitly has an 'any' type. collId = newRecCollId || defaultCollId; @@ -262,7 +259,6 @@ async function startRecorder(tabId, opts) { await self.recorders[tabId].attach(); } catch (e) { console.warn(e); - // @ts-expect-error - TS2322 - Type 'unknown' is not assignable to type 'null'. err = e; } return err; @@ -318,7 +314,6 @@ chrome.runtime.onMessage.addListener( newRecUrl = message.url; newRecCollId = message.collId; autorun = message.autorun; - // @ts-expect-error - TS2322 - Type 'unknown' is not assignable to type 'null'. defaultCollId = await getLocalOption("defaultCollId"); chrome.tabs.create({ url: "about:blank" }); break; diff --git a/src/recorder.ts b/src/recorder.ts index 2e06754c..72ec9dc3 100644 --- a/src/recorder.ts +++ b/src/recorder.ts @@ -1913,7 +1913,6 @@ class Recorder { }); if (!promise) { - // @ts-expect-error - TS2322 - Type 'Promise' is not assignable to type 'null'. promise = p; } @@ -1969,7 +1968,6 @@ class Recorder { if (!SKIPPED_NODES.includes(name)) { const value = strings[nodeValues[i]].trim(); if (value) { - // @ts-expect-error - TS2345 - Argument of type 'any' is not assignable to parameter of type 'never'. accum.push(value); } } diff --git a/src/requestresponseinfo.ts b/src/requestresponseinfo.ts index de523fe3..3312a886 100644 --- a/src/requestresponseinfo.ts +++ b/src/requestresponseinfo.ts @@ -256,9 +256,7 @@ class RequestResponseInfo { const respHeaders = this.getResponseHeadersDict(payload.length); const reqHeaders = this.getRequestHeadersDict(); - // @ts-expect-error - TS2531 - Object is possibly 'null'. const mime = (respHeaders.headers.get(CONTENT_TYPE) || "").split(";")[0]; - // @ts-expect-error - TS2531 - Object is possibly 'null'. const cookie = reqHeaders.headers.get("cookie"); if (cookie) { @@ -279,7 +277,6 @@ class RequestResponseInfo { // @ts-expect-error - TS2339 - Property 'postData' does not exist on type 'RequestResponseInfo'. postData: this.postData, }; - // @ts-expect-error - TS2345 - Argument of type '{ url: any; headers: Headers | null; method: any; postData: any; }' is not assignable to parameter of type 'Request'. if (postToGetUrl(convData)) { //this.requestBody = convData.requestBody; // truncate to avoid extra long URLs @@ -421,7 +418,6 @@ class RequestResponseInfo { } try { - // @ts-expect-error - TS2322 - Type 'Headers' is not assignable to type 'null'. headers = new Headers(headersDict); } catch (e) { for (const key of Object.keys(headersDict)) { @@ -440,11 +436,9 @@ class RequestResponseInfo { headersDict[key] = headersDict[key].replace(/\n/g, ", "); } try { - // @ts-expect-error - TS2322 - Type 'Headers' is not assignable to type 'null'. headers = new Headers(headersDict); } catch (e) { console.warn(e); - // @ts-expect-error - TS2322 - Type 'Headers' is not assignable to type 'null'. headers = new Headers(); } } @@ -463,9 +457,7 @@ class RequestResponseInfo { // @ts-expect-error - TS2554 - Expected 1 arguments, but got 0. const { headers } = this.getResponseHeadersDict(); - // @ts-expect-error - TS2531 - Object is possibly 'null'. const contentType = headers.get(CONTENT_TYPE); - // @ts-expect-error - TS2531 - Object is possibly 'null'. const contentLength = headers.get(CONTENT_LENGTH); if (Number(contentLength) !== length) {