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

vitest type issue (WeakKey type) #3381

Open
gabrocheleau opened this issue Apr 27, 2024 · 1 comment · May be fixed by #3369
Open

vitest type issue (WeakKey type) #3381

gabrocheleau opened this issue Apr 27, 2024 · 1 comment · May be fixed by #3369

Comments

@gabrocheleau
Copy link
Contributor

At this moment, the only remaining type issue in the monorepo is the following:

+ tsc -p ./tsconfig.json --noEmit
../../node_modules/@vitest/utils/dist/error.d.ts:4:58 - error TS2304: Cannot find name 'WeakKey'.

4 declare function serializeError(val: any, seen?: WeakMap<WeakKey, any>): any;
                                                           ~~~~~~~

../../node_modules/@vitest/utils/dist/error.d.ts:6:96 - error TS2304: Cannot find name 'WeakKey'.

6 declare function replaceAsymmetricMatcher(actual: any, expected: any, actualReplaced?: WeakSet<WeakKey>, expectedReplaced?: WeakSet<WeakKey>): {
                                                                                                 ~~~~~~~

../../node_modules/@vitest/utils/dist/error.d.ts:6:133 - error TS2304: Cannot find name 'WeakKey'.

6 declare function replaceAsymmetricMatcher(actual: any, expected: any, actualReplaced?: WeakSet<WeakKey>, expectedReplaced?: WeakSet<WeakKey>): {
                                                                                                                                      ~~~~~~~

../../node_modules/vite/dist/node/index.d.ts:5:41 - error TS2307: Cannot find module 'rollup/parseAst' or its corresponding type declarations.

5 export { parseAst, parseAstAsync } from 'rollup/parseAst';
                                          ~~~~~~~~~~~~~~~~~

This seems to correspond to this issue: vitest-dev/vitest#4921

From researching the issue, it seems to be related to this TS feature: microsoft/TypeScript#54195 which is part of TypeScript 5.2. For context, we are on version 4.7.4.

@acolytec3
Copy link
Contributor

acolytec3 commented May 6, 2024

This gets resolved in vitest 1.5.2 so if we can figure out how to update vitest to a later version and it all work in #3369 , this can be closed.

@acolytec3 acolytec3 linked a pull request May 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants