Skip to content

tooling: add real TypeScript typechecking (tsc --noEmit) #1

@TheStack-ai

Description

@TheStack-ai

Problem

npm run typecheck currently runs node scripts/build.mjs --check, which performs syntax stripping only via stripTypeScriptTypes. It does not catch semantic type errors like Type 'string' is not assignable to 'number'.

Proposed approach

  1. Add typescript as a devDependency.
  2. Replace or augment the typecheck script with tsc --noEmit.
  3. Wire it into the default test script and (later) CI (infra: set up GitHub Actions CI (build + test on Node 22.x) #2).

The repo already has a strict tsconfig.json (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes) — just no compiler honoring it yet.

Win-win

  • Contributor: a concrete, well-scoped first PR with immediate positive impact.
  • Project: catches real regressions before users see them.

Pointers

  • scripts/build.mjs — current syntax-only "typecheck"
  • tsconfig.json — strict config ready to use
  • package.jsonscripts.typecheck

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions