You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ilia-kebets-sonarsource
changed the title
Rule: "typeof" expressions should only be compared to valid values
Add rule S4125: "typeof" expressions should only be compared to valid values
Jun 7, 2022
TypeScript compiler complains when typeof is compared to the wrong literal, so there is no sense for us to have this rule enabled for TypeScript.
Message from typescript compiler:
This condition will always return 'false' since the types '"string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function"' and '"Number"' have no overlap.ts(2367)
Implements RSPEC-4125)
The text was updated successfully, but these errors were encountered: