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
Typescript does not evaluate all conditions to determine actual types, if the condition is always false because of a literal "false".
Adding a "false &&" to a condition is often done during debugging.
Bug Report
Typescript does not evaluate all conditions to determine actual types, if the condition is always false because of a literal "false".
Adding a "false &&" to a condition is often done during debugging.
🔎 Search Terms
false condition, type
🕗 Version & Regression Information
4.7.3, 4.7.4
⏯ Playground Link
none
💻 Code
🙁 Actual behavior
When adding a "false &&" to a condition of an if, the original condition is ignored for the type checks in the if block.
🙂 Expected behavior
It still compiles.
The text was updated successfully, but these errors were encountered: