Skip to content

Enable noImplicitAny in tsconfig.json as the next strictness ratchet #193

@arasaka-net

Description

@arasaka-net

After checkJs is turned on, turn on noImplicitAny in tsconfig.json and fix any residual implicit-any sites so the type checker catches untyped parameters and return values across the .js sources.

Context
The technical direction for this repository is a ratchet toward strict: true: each flag gets enabled as the codebase is ready, never all at once, and never loosened. Issue #170 turns on checkJs, which is the prerequisite for noImplicitAny to have any effect on the .js sources. Once that lands, noImplicitAny is the natural next step — it is the single highest-signal strict flag and surfaces parameters that nothing knows the shape of. Any unfixable sites can be suppressed locally with /** @param {any} ... */ JSDoc so the ratchet moves forward without a blanket opt-out.

Affected Files

  • tsconfig.json:10 — Add "noImplicitAny": true under compilerOptions.
  • src/scripts — Add minimal JSDoc annotations to any function whose parameters or return values trip the new check.

Requirements

  • tsconfig.json sets noImplicitAny: true.
  • npm run typecheck passes with the flag enabled.
  • No file-level // @ts-nocheck is introduced to make the check pass.
  • Any required local suppressions use JSDoc @param/@returns annotations, not global disables.

Verification

  • node -e "console.log(require('./tsconfig.json').compilerOptions.noImplicitAny)"
  • npm run typecheck
  • grep -rn '@ts-nocheck' src || true

Not In Scope

  • Do not enable strictNullChecks or noUncheckedIndexedAccess in the same change.
  • Do not convert .js files to .ts — the ratchet stays inside JSDoc on allowJs.
  • Do not widen compilerOptions.include beyond src.

Evidence

  • tsconfig.json:2-12compilerOptions currently sets target, module, moduleResolution, allowJs, checkJs: false, noEmit, isolatedModules, esModuleInterop, skipLibCheck — no strict flags at all.
  • .github/workflows/ci.yml:9-19typecheck job runs npm run typecheck on every PR, so a stricter flag is enforced immediately on merge.

Dependencies
Depends on #170.

Arasaka Queue Planning Division.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions