Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
deathmaz opened this issue Feb 17, 2025 · 1 comment · Fixed by #5192

Comments

@deathmaz
Copy link

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"
@inubs
Copy link

inubs commented Feb 17, 2025

+1 similar error when using slots

<template lang="pug">
div
  slot
</template>

rolllback to vue-tsc: 2.2.0 works

TotomInc added a commit to TotomInc/vue3-select-component that referenced this issue Feb 18, 2025
TotomInc added a commit to TotomInc/vue3-select-component that referenced this issue Feb 18, 2025
… bug fixes (#204)

* feat: major improvements, restructure DOM, split components, improve styles

* fix(docs): experiment with <ClientOnly /> to avoid SSR issues on /demo/single-select

* tests: remove duplicate tests, consolidate them

* chore: ignore test type error

* chore: regenerate package-lock

* build: bump dev-deps

* feat(select): rework CSS variables

* feat(docs): /dropdown-options to /options

* chore(docs): update install command, update vue 3.5+ notice

* build: rollback to vue-tsc 2.2.0

See vuejs/language-tools#5191

* fix(select): don't import defineExpose since it's a compiler macro

* feat(select): add data-state attribute

* feat(docs): add props.class

* feat(docs): update styling docs

* feat(docs): update events docs

* feat(docs): update /typescript docs

* feat(docs): update /options docs

* feat(docs): add external link to playground

* feat(docs): rework demos and make them SSR friendly

* chore: release v0.11.0-beta.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants