-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Assign to union with over 25 items gives error #43283
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
Duplicate of #40803. Used search terms: This is a hard coded intentional limit. |
@MartinJohns Thanks! Is there any known and accepted workaround for this? And are there any plans to up the limit in the near future? |
I don't know of any workaround, and I'm not aware of any plans to increase this limit. But that would be up to the TypeScript team, of course. A good idea is to subscribe to the existing issue, so you get notified if something is changing. |
We don't plan to change this. There are a decent number of cases where we try this structural expansion but it doesn't work, so limiting the cost of that happening is important. |
It will be good if there will be right error about this limit, not incompatible error |
It's not clear how to do this. "It's possible that a finite expansion of all possible inhabitants of each type may result in a subset" is going to be true a decent amount of time yet would be very confusing. |
Wouldn't it be desiarable to add a tsconfig parameter for the limit? |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Bug Report
π Search Terms
union 25
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
Types of property 'kind' are incompatible.
π Expected behavior
no error
The text was updated successfully, but these errors were encountered: