Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Replace the 98 explicit `: any` annotations with concrete types, starting with the auth and payments modules

Open
#205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
eslint, node.js, typescript
Domain
api, backend

Research direction

Start with .eslintrc.js and tsconfig.json, then inspect the : any sites in src/core/auth/ and src/payments/, using existing DTOs and entities as the issue suggests. Record the baseline with the provided grep command; finish when the lint rule is set to warn, both modules contain no any, the count is recorded and reduced, and npx tsc --noEmit and npm test pass.

Written by the indexing model from the issue text.

Description

advanced help wanted refactor

Problem

src/ contains ~98 explicit : any annotations. ESLint cannot flag them because .eslintrc.js:38 sets:

'@typescript-eslint/no-explicit-any': 'off',

and tsconfig.json sets "noImplicitAny": false, so implicit any is invisible too.

Concrete examples already seen: audit-log.service.ts:17 (async recordVerification(result: any)), file-upload.controller.ts:126 (category: category as any), and src/common/ pagination and interceptor code.

Why it matters

any disables the compiler exactly where it is most useful. In recordVerification(result: any), a change to the verification result shape will compile cleanly and fail at runtime. This compounds the strictness issue in tsconfig.json — with no-explicit-any off and strict off, the type system is effectively advisory across the whole codebase.

It also directly contradicts the project's own stated goal in README.md line 266:

Write DTOs for all controller inputs and use class-validation for strict contracts.

Suggested Direction

Incremental, module by module — do not attempt all 98 at once.

  1. Tighten the linter first so the count cannot grow:
    '@typescript-eslint/no-explicit-any': 'warn',
    
    Warnings, not errors, so nothing breaks on day one. Change off → warn in a standalone PR.
  2. Then work down the list, highest-risk first:
    • src/core/auth/ — token and credential paths
    • src/payments/ — money movement
    • src/blockchain/oracle/ — on-chain submission
    • src/infrastructure/audit/ — the audit trail
  3. Ban new ones in touched files via // eslint-disable-next-line @typescript-eslint/no-explicit-any with a reason, so the reduction is enforceable.
  4. Use existing DTOs and entities rather than inventing types — most : any sites look like a missing DTO annotation.

Get the current count with grep -rn ': any' src/ --include='*.ts' | wc -l and record it, so progress is measurable.

Constraints

  • strictNullChecks is off, so replacing any with a specific type can surface null errors that did not exist before. Expect churn in DTO-to-entity boundaries.
  • Do not introduce unknown as a cop-out without adding a type guard — that just relocates the problem.
  • Do not change runtime behaviour.

Acceptance Criteria

  • no-explicit-any is set to warn in .eslintrc.js.
  • The baseline count is recorded in the issue.
  • The count has decreased, with the auth and payments modules fully addressed.
  • No any remains in src/core/auth/ or src/payments/.
  • npx tsc --noEmit and npm test pass.
Dominant language
TypeScript
Stars
7
Forks
55
Avg merge
1d 17h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SourceXXL/alian_structure-api

All issues in SourceXXL/alian_structure-api

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.