Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typescript typecheck error #282

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

dgolovin
Copy link
Contributor

$ 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

```
$ 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 <dgolovin@redhat.com>
Copy link
Collaborator

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shoud add a new typecheck script in package.json and update the workflows

@dgolovin
Copy link
Contributor Author

We shoud add a new typecheck script in package.json and update the workflows

Created #284.

@dgolovin dgolovin merged commit 3028eb9 into crc-org:main Aug 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants