After updating my Vue 2.0 Typescript project that utilizes vue-class-component
to Vue 2.5, I encountered the following error in the declaration file:
ERROR in /myproject/node_modules/vue-class-component/lib/declarations.d.ts
(6,33): error TS2702: 'Vue' only refers to a type,
but is being used as a namespace here.
It appears that the declaration.d.ts
file is using Vue
as a namespace:
options: Vue.ComponentOptions<Vue>
How can this be resolved? Could it be an oversight or bug in the declaration file of vue-class-component
?
The entire declaration file is as follows:
import Vue from 'vue';
export declare type VueClass = {
new (): Vue;
} & typeof Vue;
export declare type DecoratedClass = VueClass & {
__decorators__?: ((options: Vue.ComponentOptions<Vue>) => void)[];
};