Converting a component with `convert` not returning a correct type
Closed this issue · 4 comments
chanlito commented
In 2.1.1, using the below code:
export const VAvatar = ofType<Props, Events, ScopedSlots>().convert(
VueAvatarOriginal,
);
the type of VAvatar
is like the following:
const VAvatar: VueConstructor<{
_tsxattrs: TsxComponentAttrs<Props, Events, ScopedSlots>;
} & Vue>
but when I use with 2.2.0
the type of VAvatar
is like the following instead:
const VAvatar: VueConstructor<any>
chanlito commented
I've made a repo here https://github.com/chanlito/vue-tsx-support-convert-type-bug showing this issue.
wonderful-panda commented
Sorry, I have no time to fix this problem now.
This is a workaround for now.
const Avatar = ofType<Props, Events>().convert(require('vue-avatar').Avatar as typeof Vue);
wonderful-panda commented
Fixed in v2.2.1
pksorensen commented
@wonderful-panda - is this related #48