After upgrading my Vue 2.0 Typescript project that uses vue-class-component
to Vue 2.5, I get 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.
Indeed, the declaration.d.ts
seems to use Vue
as a namespace:
options: Vue.ComponentOptions<Vue>
But how can I fix this? Is this an oversight/glitch in the declaration file of vue-class-component
?
The whole declaration file:
import Vue from 'vue';
export declare type VueClass = {
new (): Vue;
} & typeof Vue;
export declare type DecoratedClass = VueClass & {
__decorators__?: ((options: Vue.ComponentOptions<Vue>) => void)[];
};