SonarTS
SonarTS copied to clipboard
FP no-useless-cast (S4325): boolean literal as operand
See #482, Reported in #828
const right = {
error: true as true // cast is flagged as unnecessary
}
typeof right.error // true
const wrong = {
error: true
}
typeof wrong.error; // boolean