-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Conditional type partially computed #43591
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
Comments
Changed between 3.8 and 3.9 |
I believe this must be a bug due to substitution types or something. For example, this works: type A = Array<string> extends Array<any> ? Array<number> extends Array<infer T> ? T : never : never It's unclear what to do in the general case - ideally here you'd get |
From conversation with Anders—why are we even making a substitution type that doesn’t include a type parameter? That seems fishy. |
We have for a long time. Any type on the LHS of a conditional |
This is probably an issue where |
I experience problems with the following in 4.2.4:
In 4.2.4, The exact same type works perfectly in 4.1.x. Not sure if this is a bug or I did something wrong. All I know is that I had this type working before 4.2 :( |
@VictorQueiroz that's a separate issue, and one we've gotten a lot recently, related to aliases. In short, we used to keep around a |
Bug Report
🔎 Search Terms conditional type partially completely
🕗 Version & Regression Information 4.3.0-dev.20210406
💻 Code
🙁 Actual behavior
Type computed partially
🙂 Expected behavior
Type computed completely
The text was updated successfully, but these errors were encountered: