Skip to content

Vue + typescript #702

@Atala

Description

@Atala

Hi ,

I am using vue + typescript. Thanks for your PR #484. On my project it didn't work out of the box, I needed to add a typescript definition file in my project (as stated here https://github.com/Microsoft/TypeScript-Vue-Starter#single-file-components)

// ./src/vue-shim.d.ts
declare module "*.vue" {
    import Vue from "vue";
    export default Vue;
}

I could not build before :

 ERROR  Failed to compile with 1 errors                                                                                                                                               15:29:42

 error  in xxxx/js/prof/sequences-list.ts

[tsl] ERROR in xxxxx/js/prof/sequences-list.ts(2,27)
      TS2307: Cannot find module '../components/resourcesList.vue'.

I have a low level of Vue understanding (well I am setting up my first project), but it maybe interesting to add it into the docs.

[EDIT] : actually it may be because of this, https://fr.vuejs.org/v2/guide/typescript.html#Utilisation-de-base , so maybe it is worth mentionning ?

cc @Lyrkan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions