Skip to content

vue-tsc v2.2.0 causes Vue errors #5114

Open
@UglyHobbitFeet

Description

Vue - Official extension or vue-tsc version

2.2.0

VSCode version

1.96.2

Vue version

3.5.13

TypeScript version

5.7.2

System Info

N/A

package.json dependencies

No response

Steps to reproduce

Ever since upgrading from vue-tsc 2.1.10 to 2.2.0 I now get compile errors outside of my code. You can see below multiple errors for the same line of code. Note - That line of code does not exist in my file, so it's referring to the post compiled one. Also the errors below shown 'defineCOmponent', which is not used explicitly in my code and the only appearance of that term is in the vite-env.d.ts file (shown further below)

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'DataTableHeader'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'DataTableItem'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'DataTableItemProps'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'Group'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'GroupableItem'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'InternalItem'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'LoaderSlotProps'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS4082: Default export of the module has or is using private name 'SelectableItem'.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });
     ~~~

src/MyFile.vue:1235:1 - error TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

1235 export default (await import('vue')).defineComponent({
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1236 setup() {
     ~~~~~~~~~
 ... 
1241 __typeEl: {} as __VLS_TemplateResult['rootEl'],
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1242 });

What is expected?

Not to get the errors shown above upon compile

What is actually happening?

I'm getting the errors shown above

Link to minimal reproduction

No response

Any additional comments?

FWIW I'm using the standard vite-env.d.ts

/// <reference types="vite/client" />

declare module '*.vue' {
  import type { DefineComponent } from 'vue';
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-empty-object-type
  const component: DefineComponent<{}, {}, any>;
  export default component;
}

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