Skip to content

Eliminate any type usage across the entire codebase #891

Description

@nanaf6203-bit

Problem

Hundreds of any type annotations across the codebase in services, controllers, guards, and tests. While some uses are unavoidable, the vast majority represent missed typing opportunities.

Why It Matters

The ESLint config already warns on @typescript-eslint/no-explicit-any (set to warn), but the codebase doesn't respect this rule. any disables TypeScript's type checker entirely.

Technical Context

Found in critical paths: src/auth/auth.service.ts (DTOs, API responses, token payloads), src/transactions/transactions.service.ts (Prisma queries, DTO mappings), src/admin/admin.service.ts (query builders), src/dashboard/dashboard.service.ts (data transformations).

Expected Outcome

Zero any usages in production code (except unavoidable third-party interop).

Acceptance Criteria

  • All production source files have zero any annotations
  • Generic types () used where appropriate
  • Proper interfaces created for complex data structures
  • @typescript-eslint/no-explicit-any rule set to error
  • Build passes with the stricter rule

Files Affected

src/**/*.ts (widespread)

Difficulty

Hard

Estimated Effort

Extra Large (project-wide)

Labels

type-safe, refactoring, tech-debt

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions