Skip to content
Latchkey

Deno check TypeScript type errors (TS...) in CI

The deno check step type-checks your TypeScript and reports diagnostics as errors. Any TS error (for example TS2345 argument type, TS2339 property missing) fails the job.

What this error means

The check step fails with one or more "error: TSxxxx [ERROR]: ..." diagnostics naming the file, line, and mismatch.

deno
error: TS2345 [ERROR]: Argument of type 'string' is not assignable to parameter of type 'number'.
  add("2");
      ~~~
    at file:///home/runner/work/app/app/src/main.ts:5:5

Common causes

A real type mismatch in the code

The reported line passes or returns a value whose type does not satisfy the signature.

Stricter checking than the local run used

CI runs deno check (or deno test type-checks) while local deno run may skip full checking, so the error only appears in CI.

How to fix it

Fix the type at the reported location

  1. Open the file and line in the diagnostic.
  2. Correct the value or the type so the signature is satisfied.
  3. Re-run deno check to confirm it passes.
Terminal
deno check main.ts

Run the same check locally

Match CI by type-checking locally so diagnostics surface before pushing.

Terminal
deno check **/*.ts

How to prevent it

  • Run deno check locally as part of your pre-push flow.
  • Keep type strictness consistent between local and CI.
  • Fix diagnostics at the source rather than suppressing them.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →