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
- Delete the unused variable or import
Prefix intentionally-unused parameters
- 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
TS7006: Parameter implicitly has an any type - in CIFix "error TS7006: Parameter 'x' implicitly has an 'any' type" under noImplicitAny when tsc runs in CI.
TS2304: Cannot find name - in CIFix "error TS2304: Cannot find name 'x'" when tsc runs in CI - a missing import, a missing lib/types entry, o…
TS6059: File is not under rootDir - in CIFix "error TS6059: File 'x' is not under 'rootDir'. 'rootDir' is expected to contain all source files" when t…