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
{{ message }}
Repository navigation
Double (exclusion) inference doesn't narrow union objectΒ #61075
Activity
[-]Double inference doesn't narrow union object[/-][+]Double (exclusion) inference doesn't narrow union object[/+]IllusionMH commentedon Jan 29, 2025
Duplicate of #56023, #31404 etc.
exoRift commentedon Jan 29, 2025
What is the original issue? Is this planned to be fixed?
exoRift commentedon Jan 30, 2025
I've devised a workaround for this issue which is to split the property's string union into an upper-level object union
https://www.typescriptlang.org/play/?ts=5.7.3#code/C4TwDgpgBAKhDOwoF4oG8CwAoKuoGMALCfAawC4oByAJwQHsAbANwgBMrs8phCBLAHYBzSgICuAWwBGEGtgC+UAD7oueIiQrVG9AIZtBQqsuqya9OhzW5ehymIFsIAM0HsF2bPnoDEUZ-T0lHB+qGiKuvCwCMCeWHzOUAAUAfQAdBpkKMioVDr6hsZKKqkZxFk5uWYW7FQAlKo4eKWZpNZQAPQdUAB6APztpbbC7V29A1iKEIzw0JhNuC3lbQud3f2DgWnDQqPrE-JxoJBQAOoWpLrmDmwojdytlLQMLLXtO6KSMnKTJklJ8weyye+QMwk4vxUgPUwNMNHMlgh8gaADJ7ngPlAbi43GwFHU4t5fEgpFdKOcaJdro47uEoJEzhcrvQbnEEslSTQyppsrlQYVlCpOdyKjk4Qjag1obhha09uN2sKdvKNr9prN0TKriKVtwxqruEr+CNVvqDtggA
MartinJohns commentedon Jan 31, 2025
He linked the original issue. It's marked as design limitation, so it's unlikely to be solved anytime soon.
typescript-bot commentedon Feb 10, 2025
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.