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
constnationID=19818if(localStorage.getItem("id")==nationID){// do something}
🙁 Actual behavior
Typescript incorrectly complains saying that there is no overlap here between a string | null and a number. If I was using three equal symbols then I would agree with it, but I’m not because I want it to do the conversion for me. "4" == 4 returns true while "4" === 4 returns false. It is wrong for typescript to treat a double equal symbol and triple equal symbol as the same.
🙂 Expected behavior
Typescript to not not complain about something that isn’t true.
The text was updated successfully, but these errors were encountered:
Bug Report
💻 Code
🙁 Actual behavior
Typescript incorrectly complains saying that there is no overlap here between a string | null and a number. If I was using three equal symbols then I would agree with it, but I’m not because I want it to do the conversion for me. "4" == 4 returns true while "4" === 4 returns false. It is wrong for typescript to treat a double equal symbol and triple equal symbol as the same.
🙂 Expected behavior
Typescript to not not complain about something that isn’t true.
The text was updated successfully, but these errors were encountered: