ethereumjs-monorepo
ethereumjs-monorepo copied to clipboard
vitest type issue (WeakKey type)
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: https://github.com/vitest-dev/vitest/issues/4921
From researching the issue, it seems to be related to this TS feature: https://github.com/microsoft/TypeScript/pull/54195 which is part of TypeScript 5.2. For context, we are on version 4.7.4.
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.