Skip to content
Latchkey

TS6133: Declared but its value is never read - in CI

With noUnusedLocals or noUnusedParameters on, a declared variable, import, or parameter is never used.

What this error means

Type-checking fails with TS6133 naming the unused binding - passes locally if these flags differ from CI.

tsc
src/util.ts(3,7): error TS6133: 'temp' is declared but its value is never read.

Common causes

How to fix it

Remove the unused binding

  1. Delete the unused variable or import

Prefix intentionally-unused parameters

  1. Prefix a deliberately-unused parameter with an underscore so the rule ignores it
ts
arr.map((_item, index) => index)

How to prevent it

  • Keep noUnusedLocals/noUnusedParameters on and prune dead code; underscore-prefix intentional unused params.

Related guides

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