Skip to content

Commit

Permalink
fix: fix typescript typecheck error
Browse files Browse the repository at this point in the history
```
$ 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 <[email protected]>
  • Loading branch information
dgolovin committed Aug 20, 2024
1 parent b053457 commit 3028eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crc-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Status>();
Expand Down

0 comments on commit 3028eb9

Please sign in to comment.