Bug
frontend/package.json has:
"typescript": "^5",
"@types/jest": "^29.5.12"
@types/jest@29.5.x targets TypeScript 4.9 compatibility. While it works with TypeScript 5, it does not take advantage of TypeScript 5's improved type inference and may generate spurious type errors or miss type narrowing opportunities in test files.
Additionally, ts-jest (if used) or jest transform configuration may need updating to align with TypeScript 5 module resolution.
Fix
Upgrade @types/jest to the latest version that explicitly supports TypeScript 5:
npm install --save-dev @types/jest@latest
Also verify tsconfig.json used by Jest (often tsconfig.test.json or a jest.config.ts reference) specifies "moduleResolution": "bundler" or "node16" as appropriate for TS5.
Run npm test after upgrading to confirm no regressions.
Acceptance Criteria
References
frontend/package.json
frontend/tsconfig.json
Bug
frontend/package.jsonhas:@types/jest@29.5.xtargets TypeScript 4.9 compatibility. While it works with TypeScript 5, it does not take advantage of TypeScript 5's improved type inference and may generate spurious type errors or miss type narrowing opportunities in test files.Additionally,
ts-jest(if used) orjesttransform configuration may need updating to align with TypeScript 5 module resolution.Fix
Upgrade
@types/jestto the latest version that explicitly supports TypeScript 5:Also verify
tsconfig.jsonused by Jest (oftentsconfig.test.jsonor ajest.config.tsreference) specifies"moduleResolution": "bundler"or"node16"as appropriate for TS5.Run
npm testafter upgrading to confirm no regressions.Acceptance Criteria
@types/jestupgraded to a version that explicitly supports TypeScript 5npm testpasses after upgrade with no new type errorstsconfig.jsonuses TypeScript 5-compatible module resolutionReferences
frontend/package.jsonfrontend/tsconfig.json