Summary
Improve type safety in event.ts by removing remaining usages of any and replacing them with proper Fastify, TypeScript, Prisma, and application-specific types.
Contexts
The event routes currently contain several usages of any that bypass TypeScript's type checking and reduce maintainability.
Examples include:
const server = request.server as any;
(app as any).authenticate
Some of these usages are related to authentication, Fastify route handlers, and Prisma error handling. Existing shared Fastify/JWT type definitions should be reused where available instead of introducing duplicate definitions.
Removing these usages will improve maintainability, reduce unsafe casts, and make future refactoring easier.
Tasks
Acceptance Criteria
Area
backend
Difficulty
Good First Issue
Summary
Improve type safety in
event.tsby removing remaining usages ofanyand replacing them with proper Fastify, TypeScript, Prisma, and application-specific types.Contexts
The event routes currently contain several usages of
anythat bypass TypeScript's type checking and reduce maintainability.Examples include:
Some of these usages are related to authentication, Fastify route handlers, and Prisma error handling. Existing shared Fastify/JWT type definitions should be reused where available instead of introducing duplicate definitions.
Removing these usages will improve maintainability, reduce unsafe casts, and make future refactoring easier.
Tasks
anyusages inevent.tsserver as anywith appropriate Fastify typesapp as anywith appropriate Fastify typesrequest.user as anywith properly typed user accesserror: anywith safer error handling patternsAcceptance Criteria
anyusages remain inevent.tsanyusageArea
backendDifficulty
Good First Issue