diff --git a/app/client/package.json b/app/client/package.json index 452309a436..99346e9193 100644 --- a/app/client/package.json +++ b/app/client/package.json @@ -66,6 +66,7 @@ "@tinymce/tinymce-react": "^3.13.0", "@types/google.maps": "^3.51.0", "@types/react-page-visibility": "^6.4.1", + "@types/web": "^0.0.99", "@uppy/core": "^1.16.0", "@uppy/dashboard": "^1.16.0", "@uppy/file-input": "^1.4.22", diff --git a/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx b/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx index 21181e1b5b..09c0460c07 100644 --- a/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx +++ b/app/client/src/components/editorComponents/CodeEditor/EvaluatedValuePopup.tsx @@ -668,7 +668,6 @@ function EvaluatedValuePopup(props: Props) { }} onMouseLeave={() => { const id = setTimeout(() => setContentHovered(false), 500); - // @ts-expect-error: setTimeout return type mismatch setTimeoutId(id); }} preparedStatementViewer={ diff --git a/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx b/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx index f2b7cd0962..10cc5de8bd 100644 --- a/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx +++ b/app/client/src/pages/Editor/gitSync/Tabs/GitConnection.tsx @@ -195,7 +195,6 @@ function GitConnection({ isImport }: Props) { }, []); const stopShowingCopiedAfterDelay = () => { - // @ts-expect-error: setTimeout return type mismatch timerRef.current = setTimeout(() => { setShowCopied(false); }, 2000); diff --git a/app/client/src/pages/common/CanvasArenas/hooks/useCanvasDragToScroll.ts b/app/client/src/pages/common/CanvasArenas/hooks/useCanvasDragToScroll.ts index ac86991473..b50ceca89e 100644 --- a/app/client/src/pages/common/CanvasArenas/hooks/useCanvasDragToScroll.ts +++ b/app/client/src/pages/common/CanvasArenas/hooks/useCanvasDragToScroll.ts @@ -48,7 +48,6 @@ export const useCanvasDragToScroll = ( behavior: "smooth", }); } - // @ts-expect-error: setTimeout return type mismatch scrollTimeOut.push(setTimeout(scrollFn, 100 * Math.max(0.4, speed))); } }; diff --git a/app/client/src/sagas/FormEvaluationSaga.ts b/app/client/src/sagas/FormEvaluationSaga.ts index 3d0f804c8b..f8fe063d8f 100644 --- a/app/client/src/sagas/FormEvaluationSaga.ts +++ b/app/client/src/sagas/FormEvaluationSaga.ts @@ -231,7 +231,7 @@ function* fetchDynamicValueSaga( } // Call the API to fetch the dynamic values - const response: ApiResponse = yield call( + const response: ApiResponse<{ trigger?: unknown }> = yield call( PluginsApi.fetchDynamicFormValues, url, { @@ -243,7 +243,6 @@ function* fetchDynamicValueSaga( }, ); dynamicFetchedValues.isLoading = false; - // @ts-expect-error: we don't know what the response will be if (response.responseMeta.status === 200 && "trigger" in response.data) { dynamicFetchedValues.data = response.data.trigger; dynamicFetchedValues.hasFetchFailed = false; diff --git a/app/client/src/utils/WorkerUtil.test.ts b/app/client/src/utils/WorkerUtil.test.ts index f5e7e7cfc1..731ae9aa2a 100644 --- a/app/client/src/utils/WorkerUtil.test.ts +++ b/app/client/src/utils/WorkerUtil.test.ts @@ -61,10 +61,8 @@ class MockWorkerClass implements WorkerClass { body: { data: message.body.data }, }; this.sendEvent({ data: response }); - // @ts-expect-error: setTimeout return type mismatch this.responses.delete(counter); }, this.delayMilliSeconds); - // @ts-expect-error: setTimeout return type mismatch this.responses.add(counter); } diff --git a/app/client/src/widgets/ButtonGroupWidget/component/index.tsx b/app/client/src/widgets/ButtonGroupWidget/component/index.tsx index 98093b30f0..40be1f2043 100644 --- a/app/client/src/widgets/ButtonGroupWidget/component/index.tsx +++ b/app/client/src/widgets/ButtonGroupWidget/component/index.tsx @@ -408,7 +408,6 @@ class ButtonGroupComponent extends React.Component< }; }); - // @ts-expect-error: setTimeout return type mismatch this.timer = setTimeout(() => { this.setState(() => { return { diff --git a/app/client/src/widgets/TableWidgetV2/widget/index.tsx b/app/client/src/widgets/TableWidgetV2/widget/index.tsx index a561cef98b..8da52c9916 100644 --- a/app/client/src/widgets/TableWidgetV2/widget/index.tsx +++ b/app/client/src/widgets/TableWidgetV2/widget/index.tsx @@ -2421,7 +2421,6 @@ class TableWidgetV2 extends BaseWidget { * We need to let the evaulations compute derived property (filteredTableData) * before we clear the editableCell to avoid the text flickering */ - // @ts-expect-error: setTimeout return type mismatch this.inlineEditTimer = setTimeout(clear, 100); } }; diff --git a/app/client/src/workers/Evaluation/fns/overrides/fetch.ts b/app/client/src/workers/Evaluation/fns/overrides/fetch.ts index 46233ddbaa..f3ced6db32 100644 --- a/app/client/src/workers/Evaluation/fns/overrides/fetch.ts +++ b/app/client/src/workers/Evaluation/fns/overrides/fetch.ts @@ -1,6 +1,9 @@ const _originalFetch = self.fetch; export function fetch(...args: Parameters) { - const request = new Request(args[0], { ...args[1], credentials: "omit" }); + const request = new Request(args[0] as string, { + ...args[1], + credentials: "omit", + }); return _originalFetch(request); } diff --git a/app/client/yarn.lock b/app/client/yarn.lock index 1e1815fa37..6d05005418 100644 --- a/app/client/yarn.lock +++ b/app/client/yarn.lock @@ -8223,6 +8223,13 @@ __metadata: languageName: node linkType: hard +"@types/web@npm:^0.0.99": + version: 0.0.99 + resolution: "@types/web@npm:0.0.99" + checksum: 5298e64fc9db63f7da840dff77cd770c0568d3162eac406aa74e3a251c58377d370398a1d9402feb4fc49afa615808ac85be966e59fa96677a23dfd1df89ef9a + languageName: node + linkType: hard + "@types/webfontloader@npm:1.6.33": version: 1.6.33 resolution: "@types/webfontloader@npm:1.6.33" @@ -9593,6 +9600,7 @@ __metadata: "@types/tinycolor2": ^1.4.2 "@types/to-json-schema": ^0.2.1 "@types/toposort": ^2.0.3 + "@types/web": ^0.0.99 "@types/webfontloader": 1.6.33 "@types/zipcelx": ^1.5.0 "@typescript-eslint/eslint-plugin": ^5.54.1