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.

Frequently asked questions

What causes "TS6133 declared but never used"?
Type-checking fails with TS6133 naming the unused binding - passes locally if these flags differ from CI.
How do I fix TS6133 declared but never used?
Remove the unused binding

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card