Skip to content

Improve type safety in event attendees mapping #194

@Harxhit

Description

@Harxhit

Summary

Add proper typing for the attendee parameter in the attendees mapping logic to remove the implicit any TypeScript warning and improve type safety.

Contexts

The /api/events/:slug/attendees route currently maps over event.attendees, but the attendee parameter inside .map() is inferred as any, causing the TypeScript warning:

Parameter 'attendee' implicitly has an 'any' type.

This issue focuses on adding proper typing for the attendee object returned from Prisma so the mapping logic is fully typed and safer to maintain.

Tasks

  • Identify the attendee type returned from Prisma query
  • Add explicit typing for the attendee parameter or infer it correctly from Prisma
  • Ensure TypeScript and lint checks pass without implicit any warnings

Acceptance Criteria

  • attendee no longer has implicit any type
  • Mapping logic remains unchanged in behavior
  • TypeScript passes without related warnings
  • Tests added or updated if needed
  • Docs updated (if needed)

Area

backend

Difficulty

good first issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions