-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Type discrimination bug with string literal tuple. #59785
Comments
Changing |
|
This comment was marked as resolved.
This comment was marked as resolved.
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
π Search Terms
"discriminated union", "discrimination", "literal tuple", "string literal tuple"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAQghgZ2gXigbwLACgq6gSwBMB+ALigWACd8A7AcwG5s8oBrCEMi6up7AL7ZsoSFACCAFXAp0LPHCpU4IcgG0A5HA0BdZjjwAzfBAA2hBNzRRacALYRulGgwA0UOIUJUICS+Wc+AUYoAHpQqAAxE3MEDx8PU1MAewB3CEIoZNpTEChDZKooLQ1BfREZWGkxVEwDXEVlVShNACNdfVYfQnwfAGNgAFUAJQAZchHRqAAfHhcmMIjhiABHAFdejPzC4vay4SxRaHE4WkIYatk61kaVdRL3DXadGZanjUftPXlcbs2ByYTMavQIMELhKDLdabTIFIrvH5QQgQQxwNamYAASWAEDs3BKr3enSMMQsVhs9kcAV4bg8Xh8ficNPowUWUVJcUU0DgSTSW1SAAsILQoK1ksABcVtB4zrsNPFoGAGcLgPssBUxABhbLGehQVDwJBQABkUAAFFJKrMLlaJKdzpcAJTlLB9bKUKA4yjkbW0XX6uRYACQt2ami+rmwQb+-SGY3IGgFwGAYAQpHCEAAHvYwKYIAA6N12eXhAA85YAtFXPQL8HEEALkujMhKqGkZVAIEpCvnBEA
π» Code
π Actual behavior
The following test variable is suggest every field regardless of the
array: ['a']
.And it not thrown errors if i declare a non related property.
π Expected behavior
The following test variable should suggest the discriminated type fields by default.
And it not thrown errors if i declare a non related property.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: