Skip to content

fix(build): resolve all TypeScript build errors in frontend#3646

Closed
gorkem-bwl wants to merge 1 commit intodevelopfrom
fix/typescript-build-errors
Closed

fix(build): resolve all TypeScript build errors in frontend#3646
gorkem-bwl wants to merge 1 commit intodevelopfrom
fix/typescript-build-errors

Conversation

@gorkem-bwl
Copy link
Copy Markdown
Contributor

Summary

  • Fix all TypeScript errors that caused npm run build to fail (was 192 errors, now 0)
  • All fixes are type-only or test-only, no runtime behavior changes
  • Both Servers and Clients builds pass clean

Changes

  • Add vite/client and SVG type references for import.meta.env and ReactComponent
  • Fix test mock types to match updated auth slice
  • Remove unused imports in test files
  • Prefix unused Dashboard variable
  • Remove stale Event.js file

Test plan

  • Run cd Servers && npm run build (passes)
  • Run cd Clients && npm run build (passes, zero errors)
  • Verify app runs normally at localhost:5173

## Changes
- Add vite/client reference to env.vars.ts for import.meta.env types
- Add SVG declarations.d.ts reference to vite-env.d.ts for ReactComponent exports
- Add vite-env.d.ts references in store.ts and deploymentHelpers.ts for __APP_VERSION__
- Fix test mock types to match updated auth slice (isSuperAdmin, activeOrganizationId)
- Fix createElement calls in test files to pass children in props object
- Remove unused imports in test files (fireEvent, within)
- Fix Field test to use document.querySelector instead of non-existent queryByClassName
- Prefix unused variable in Dashboard (superAdminHasNoOrgs -> _superAdminHasNoOrgs)
- Fix test/setup.ts type cast
- Remove stale Event.js file

## Result
Both `cd Servers && npm run build` and `cd Clients && npm run build` pass with zero errors.
@gorkem-bwl gorkem-bwl requested a review from HarshP4585 April 1, 2026 05:41
@gorkem-bwl gorkem-bwl added this to the 2.2 milestone Apr 1, 2026
@gorkem-bwl gorkem-bwl closed this Apr 1, 2026
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.

1 participant