Skip to content

[Performance]: .vue.d.ts are not used in TypeScript Project References #3526

Closed
@vidal7

Description

@vidal7

Hello.

What I want to do

I want to better organize my codebase. So I began to introduce TypeScript Project References to help cope with performance problems in vscode and also separating tests from implementation thus it was not possible for the implementation files to import the test files. I was inspired by the official TypeScript Project References documentation on https://www.typescriptlang.org/docs/handbook/project-references.html#an-example-project.

What is my problem

However, I keep getting this TypeScript error in vscode and vue-tsc

vue/main.unit.ts:1:18 - error TS6307: File 'vue/main.vue.ts' is not listed within the file list of project 'vue/tsconfig.unit.json'. Projects must list all files or use an 'include' pattern.
  The file is in the program because:
    Imported via './main.vue' from file 'vue/main.unit.ts'
    Imported via './main.vue' from file 'vue/main.vue.ts'

1 import Main from './main.vue';
                   ~~~~~~~~~~~~

  vue/main.vue.ts:42:45
    42 let __VLS_internalComponent!: typeof import('./main.vue')['default'];
                                                   ~~~~~~~~~~~~
    File is included via import here.


Found 1 error.

image

What I expect to get
No errors in vscode, npm script build:vue is working the same way as build:ts

To reproduce

Details before reproducing

  • build:ts is building a test files project that is referring to a implementation project that contains only a ts file and it works
  • build:vue is building a tests files project that is referring to a implementation project that contains only a vue file and it doesn't work.

Is this a bug? Am I missing something?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood reproduction ✨This issue provides a good reproduction, we will be able to investigate it first

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions