"'{0}' is declared but its value is never read.": {
"category": "Error",
"code": 6133,
"reportsUnnecessary": true
Examples
Suppose someone is writing new code and not quite finished yet.
const x: number = 123;
const y: number = 321;
const product: number = x*y;
// TODO: Do something with "product"
They have not used x
yet, but they certainly plan to use it when they are done writing their code. When you run tsc
the output looks like this:
src/index.ts:9:5 - error TS6133: 'x' is declared but its value is never read.
With a professional build orchestrator, this "compiler error" will:
be printed in bright red, distracting attention from legitimate errors (e.g. calling a function that is not defined)
prevent downstream dependency projects from building
possibly also prevent other tasks (e.g. Jest) from running for the current project (we don't run tests if the code doesn't compile)
Proposal: Make it a warning instead: