-
-
Notifications
You must be signed in to change notification settings - Fork 484
Closed
Labels
Description
Using vue-tsc 0.40.13
, vue 2.7.9
, and using the options api.
I have a class called ActionList
that I am assigning in data()
like so:
data() {
return {
actionList: new ActionList([]),
}
},
...
Viewing the type when hovering over actionList
correctly shows ActionList
.
However, hovering over this.actionList
shows a destructured representation of ActionList
(fine, nbd)
The problem is that the template is throwing a type error.
This error is shown when I set the component's prop definition to either:
props: {
actionList: {
type: Object as PropType<ActionList>,
required: true,
},
}
or
props: {
actionList: {
type: ActionList,
required: true,
},
Has anyone experienced similar issues? Perhaps I just need additional configuration.
Note
Doing the following suppresses the error, but vue-tsc complains about this