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
Since I created a PR to "fix" this - I also don't see why one would like to write this but it looks like satisfiesis changing the type of its operand here and that's something that satisfies, on principle, shouldn't do. So I just decided to open a PR for this since it was a one-line change anyway.
π Search Terms
"Symbol", "satisfies", "type inference"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?#code/MYewdgzgLgBAZiEMC8MDKBPAtgIxAGwAoBKAbhgHoKYAVACwFMYoMAHJkOeRGASwmZsGnbiABQoSLBwBDAE4p02PEWIwIMqPzi8GAiMoLkqtRoPYwRshf3WH8QA
π» Code
π Actual behavior
Using the
satisfies
operator withSymbol
changes the type ofbar
tosymbol
, instead oftypeof foo
.π Expected behavior
I expected the
satisfies
operator to have no effect on type inference, sobar
should have the typetypeof bar
.Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: