TS6133

error TS6133: ‘volume‘ is declared but its value is never read.

Broken Code ❌

test.ts
1
const closes = ohlc.map(([time, open, high, low, close, volume]) => (close));
tsconfig.json
1
2
3
4
5
{
"compilerOptions": {
"noUnusedParameters": true
}
}

Fixed Code ✔️

tsconfig.json
1
2
3
4
5
{
"compilerOptions": {
"noUnusedParameters": false
}
}

error TS6133: ‘b‘ is declared but its value is never read.

Broken Code ❌

test.ts
1
let b;
tsconfig.json
1
2
3
4
5
{
"compilerOptions": {
"noUnusedLocals": true
}
}

Fixed Code ✔️

You can remove the unused variable from your code or disable the check for unused variables in your TypeScript compiler config:

tsconfig.json
1
2
3
4
5
{
"compilerOptions": {
"noUnusedLocals": false
}
}

Video Tutorial