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:5Common 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
- Open the file and line in the diagnostic.
- Correct the value or the type so the signature is satisfied.
- Re-run
deno checkto confirm it passes.
Terminal
deno check main.tsRun the same check locally
Match CI by type-checking locally so diagnostics surface before pushing.
Terminal
deno check **/*.tsHow to prevent it
- Run
deno checklocally 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
Deno check "TS2307 Cannot find module or its type declarations" in CIFix Deno "error: TS2307 Cannot find module ... or its corresponding type declarations" in CI - deno check cou…
Deno lint failures (deno lint) in CIFix deno lint failures in CI - deno lint reports rule violations that exit non-zero and fail the lint gate.
Deno "fmt --check ... Not formatted" gate failing in CIFix Deno "error: Found N not formatted files" from deno fmt --check in CI - files do not match the formatter…