Skip to content

error TS4033: Property 'inputRef' of exported interface has or is using private name '__VLS_6' #5191

Closed
@deathmaz

Description

@deathmaz

Vue - Official extension or vue-tsc version

2.2.2

VSCode version

Vue version

3.5.13

TypeScript version

5.7.3

System Info

package.json dependencies

Steps to reproduce

git clone git@github.com:deathmaz/vue-tsc-repro.git
cd vue-tsc-repro
yarn
yarn type-check

What is expected?

No error after running yarn type-check

What is actually happening?

After running yarn type-check the following error is thrown:

src/components/TestComponent.vue:41:18 - error TS4033: Property 'inputRef' of exported interface has or is using private name '__VLS_6'.

41 inputRef: typeof __VLS_6,
                    ~~~~~~~


Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Link to minimal reproduction

https://github.com/deathmaz/vue-tsc-repro

Any additional comments?

The error is not happening in this case:

diff --git a/src/components/TestComponent.vue b/src/components/TestComponent.vue
index 77b42af..dea08dd 100644
--- a/src/components/TestComponent.vue
+++ b/src/components/TestComponent.vue
@@ -4,7 +4,6 @@
   <template v-else>
     <component
       :is="'textarea'"
-      ref="inputRef"
     />
   </template>
 </template>

and in this case:

diff --git a/src/components/TestComponent.vue b/src/components/TestComponent.vue
index 77b42af..dde4b52 100644
--- a/src/components/TestComponent.vue
+++ b/src/components/TestComponent.vue
@@ -1,7 +1,5 @@
 <template>
-  <template v-if="false">
-  </template>
-  <template v-else>
+  <template>
     <component
       :is="'textarea'"
       ref="inputRef"

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions