From 3028eb9fb2aefc53ea198f87d98f4ba277ec4a4e Mon Sep 17 00:00:00 2001 From: Denis Golovin Date: Mon, 19 Aug 2024 20:17:54 -0700 Subject: [PATCH] fix: fix typescript typecheck error ``` $ npx tsc --noEmit ../crc-extension/src/crc-status.ts:65:21 - error TS2769: No overload matches this call. Overload 1 of 2, '(intervalId: string | number | Timeout): void', gave the following error. Argument of type 'Timer' is not assignable to parameter of type 'string | number | Timeout'. Property '[Symbol.dispose]' is missing in type 'Timer' but required in type 'Timeout'. Overload 2 of 2, '(id: number): void', gave the following error. Argument of type 'Timer' is not assignable to parameter of type 'number'. 65 clearInterval(this.updateTimer); ~~~~~~~~~~~~~~~~ ../crc-extension/node_modules/@types/node/timers.d.ts:130:17 130 [Symbol.dispose](): void; ~~~~~~~~~~~~~~~~ '[Symbol.dispose]' is declared here. Found 1 error in ../crc-extension/src/crc-status.ts:65 ``` Signed-off-by: Denis Golovin --- src/crc-status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crc-status.ts b/src/crc-status.ts index bc1abde..cb59908 100644 --- a/src/crc-status.ts +++ b/src/crc-status.ts @@ -26,7 +26,7 @@ const setupStatus: Status = { CrcStatus: 'Need Setup', Preset: 'Unknown' }; const errorStatus: Status = { CrcStatus: 'Error', Preset: 'Unknown' }; export class CrcStatus { - private updateTimer: NodeJS.Timer; + private updateTimer: NodeJS.Timeout; private _status: Status; private isSetupGoing: boolean; private statusChangeEventEmitter = new extensionApi.EventEmitter();