-
Notifications
You must be signed in to change notification settings - Fork 181
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 Inference forcing to destructure object #6462
Comments
@thoroc Is that still an issue with I think it's expected that two different interfaces can't be mixed, even if they have the same properties. I may be wrong, though. @MarkMcCulloh is that correct? Anyways, the error message is confusing if both interfaces are named the same. Any ideas to improve it? Maybe referring to the filename where they are declared, if the names are the same? |
Yeah, although I opened an issue to possibly change that behavior (for structs) #6467 |
I'll need to double check, although as per advice I've moved away from creating a client directly. I'll test it at first opportunity. |
@skyrpex The changes to the |
Nice! Thanks for following up @thoroc |
I tried this:
I have a class as follow:
The struct for the options has the following:
In a follow up method on the class I can do:
But not this
I am still trying to find my way around so apologies if it seems that I am writing the code the wrong way around.
This happened:
I am getting this error message:
I expected this:
To be able to assign the class property instead of having to destructure it and create a new object.
Is there a workaround?
No response
Anything else?
Potential duplicate.
Wing Version
0.73.41
Node.js Version
20.11.0
Platform(s)
MacOS
Community Notes
The text was updated successfully, but these errors were encountered: