Skip to content

[Tech Debt] Regenerate Supabase types — remove 'as any' casts #230

@realproject7

Description

@realproject7

Problem

Multiple files cast supabase.from(...) to any because the generated Supabase types don't include newer tables (comments, page_views). This suppresses type checking on all DB queries for these tables.

Fix

  1. Regenerate Supabase TypeScript types from the live schema
  2. Remove all as any casts on supabase.from(...) calls
  3. Remove corresponding eslint-disable @typescript-eslint/no-explicit-any comments

Files affected

  • src/app/api/comments/route.ts
  • src/app/api/views/route.ts
  • src/app/api/index/donation/route.ts
  • src/components/WriterTradingStats.tsx
  • src/app/dashboard/writer/page.tsx
  • Any other files with supabase.from(...) as any

Acceptance Criteria

  • Supabase types include all tables (storylines, plots, donations, comments, page_views)
  • No as any casts on Supabase queries
  • npm run typecheck passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions