You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
I don't understand the error message from vue-tsc with following code, which is basically passing a variable from a parent component to a child component. The parent component create an instance of a (custom) class and keeps the variable in its data(). Within the template it uses the child component and passes the variable to it (prop).
Yes it caused by the unwrapping of properties, when you return an object through data it will be unwrapped (aka remove .value) , on this step a new equivalent type is created.
In this particular case BoringComp is equivalent to {} since it does not expose any value or method.
If the class is really important you may mark it as raw:
defineComponent({data(){return{store: markRaw(newBoringComp([]))}},mounted(){this.store// currently doesn't work, but it should}})
In that case @bwolf do you mind opening an issue on vue-next and I can sort that out
I don't understand the error message from vue-tsc with following code, which is basically passing a variable from a parent component to a child component. The parent component create an instance of a (custom) class and keeps the variable in its data(). Within the template it uses the child component and passes the variable to it (prop).
I think my description is a bit hard to follow. Here is a minimal example where the README contains the relevant extract of the topic: https://github.com/bwolf/error-vue-tsc-data-class-instance/blob/master/README.md
Any idea what is here the problem? Thanks
The text was updated successfully, but these errors were encountered: