TS6198
All destructured elements are unused.
Broken Code ❌
function returnSomething(): { low: number; high: number } {
return {
low: 10,
high: 20,
};
}
const { low: lowest, high: highest } = returnSomething();Fixed Code ✔️
You have to make use of the destructured values in your application / code:
function returnSomething(): { low: number; high: number } {
return {
low: 10,
high: 20,
};
}
const { low: lowest, high: highest } = returnSomething();
console.log(lowest + highest);