-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Type Prediction for union with typeguard looks different from when we do not use typegurad #55961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Duplicate
An existing issue was already created
Comments
Looks like a duplicate of #55766 (comment). |
@fatcerberus |
What does it mean if it seems wired? |
Probably that the programmer had too much coffee. |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Why you guys are so offensive..... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
π Search Terms
TypeGuard
Union
π Version & Regression Information
Works After TS 4.6
β― Playground Link
https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABDAzgORAG0wCgB4Bci4A1mHAO5gCUReyKiYWmA3gFCJeIBOAplBA8k9ALzimLANzsAvu3ZQAngAc+iAKI8ecHgFUw8MAB4AKgBpEexKM3bdAPhuIA2nsvgAJn2AwwfTwBdRAAfV2ZsS1NAhXZQSFgERCg+FCgcAEMeAHMiLR19QwRjNJ4-bKdqDm5ECAQ01z5tSwA3DMwQPmDbLOzObhhgHABCVAxsHCaeair+mq4oAAsdCkQpmRr5Gv5BYUQ2jvVEAHpjxFLy0OIwb19-TzkFeOgjZNSoACZMnLz7QqMSlAymAKohZjU6mAGi4pq12p1uohenNkEMpohhhIIphwfMFstKGttBtuFtuDshEgDp0TmcLiC5EA
π» Code
π Actual behavior
The
value
variables intest
andtest2
are predicted as different typesπ Expected behavior
Both
value
intest
andtest2
should be predicted asstring
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: