-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Object.assign not inferring #55853
Comments
Please remember to completely fill out the issue template. This is working as intended. |
Shouldn't it? |
There's no mechanism in the language that allows this, and I believe analyzing such calls would be very error prone and hard on the performance. The only way to change the type of another variable like these are assertion functions, but these are not allowed to return anything (and A relevant issue for this would be #26792. |
I'm pretty sure there's a feature request for that, but I can't find it. |
|
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
🔎 Search Terms
typescript Object.assign
💻 Code
🙁 Actual behavior
ReturnType<foo>
is{}
whencould be inferred
The text was updated successfully, but these errors were encountered: