Skip to content

Fix: Add proper TypeScript path aliases for API imports #93

@Smartdevs17

Description

@Smartdevs17

Problem

API imports use relative paths like ../../middleware/validation which are fragile and hard to read.

Context

Path aliases improve code readability and make refactoring easier.

Proposed Solution

Configure TypeScript path aliases:

// tsconfig.json
{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  }
}

Then use: import { validateDeposit } from '@/middleware/validation'

Acceptance Criteria

  • Path aliases configured in tsconfig.json
  • Existing imports updated to use aliases
  • Jest configured to resolve aliases
  • Build still works

Technical Notes

  • Files: api/tsconfig.json, api/jest.config.js, all source files

Constraints

  • Must work with both tsc and ts-jest

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programapiREST API componenteasyDifficulty: EasyrefactorCode refactoring and cleanup

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions