Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Typescript definitions not working? #673

@clementdevos

Description

@clementdevos

Hey guys!

I'm currently trying to upgrade our project running vue 2.3x to vue 2.5.13 and i can't make it use VueRessource.

My vue imports and use are declared this way

import Vue from 'vue';
import VueRouter from 'vue-router';
import VueResource from 'vue-resource';
import Vue2Filters from 'vue2-filters';
import { Validator } from 'vee-validate';
import BootstrapVue from "bootstrap-vue";
import VueI18n from 'vue-i18n';


Vue.use(Vue2Filters);
Vue.use(VueResource);
Vue.use(VueRouter);
Vue.use(VueI18n);
Vue.use(infiniteScroll);
Vue.use(BootstrapVue);

But the TS compilation fails with the following error :

(61,9): error TS2345: Argument of type 'typeof "/home/clement/workspace/pingflow/v3/fry/node_modules/vue-resource/types/index"' is not assignable to parameter of type 'PluginObject<any> | PluginFunction<any>'.
  Type 'typeof "/home/clement/workspace/pingflow/v3/fry/node_modules/vue-resource/types/index"' is not assignable to type 'PluginFunction<any>'.
    Type 'typeof "/home/clement/workspace/pingflow/v3/fry/node_modules/vue-resource/types/index"' provides no match for the signature '(Vue: VueConstructor<Vue>, options?: any): void'.

I'm running the latest libraries versions : vue@2.5.13 and vue-resource@1.3.6 (double checked in the node_modules)
If it's of any help, i'm using yarn.

Cheers,

Clément

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions