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
I believe we just don't narrow infinite types to singleton types in equality checks. @andrewbranch was dealing with a similar issue, but I can't recall what the reasoning was.
Bug Report
🔎 Search Terms
🕗 Version & Regression Information
typescript@4.2.4
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Failed to compile,
Argument of type 'string' is not assignable to parameter of type '"bar" | "baz"'.ts(2345)
🙂 Expected behavior
Compiles successfully.
The text was updated successfully, but these errors were encountered: