-
-
Notifications
You must be signed in to change notification settings - Fork 426
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
[v2.2.2] Typecheck breaks on slots in the v-if
block
#5186
Comments
Please provide a minimal reproduction. |
https://github.com/Xenossolitarius/vue-tsc-2.2.2-bug Here you go pnpm i pnpm typecheck Should reproduce src/components/modal/Modal.vue:338:30 - error TS4081: Exported type alias '__VLS_Slots' has or is using private name '__VLS_15'. 338 & { default?: (props: typeof __VLS_15) => any }>; |
Oh so the problem is if the slot is in v-if |
v-if
block
tbh i hope SFC gets scrapped and we start using tsx/vine. I I think that would make your life much easier. Yea this would be a TS issue bcs this is basically how this works. But the type is available eh. And this below produces "undefined" as a type too when i add the component to your repo. Seems more than one edge case.
|
@Xenossolitarius Does disabling the ts compiler option |
* chore(deps): update dependencies (non-major) * fix(vue-tsc): use `defineSlots` instead of raw `<slot>` See vuejs/language-tools#5186 (comment). * fix(Tile): set default tile image to transparent --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sabertazimi <sabertazimi@gmail.com>
* chore(deps): update dependencies (non-major) * fix(vue-tsc): use `defineSlots` instead of raw `<slot>` See vuejs/language-tools#5186 (comment). * fix(Tile): set default tile image to transparent --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: sabertazimi <sabertazimi@gmail.com> 67833ea
If that can be of any help, I have a similar issue with an unused template ref I have a node with a
Removing the unused ref attribute solved the issue. I didn't get this issue with |
Vue - Official extension or vue-tsc version
2.2.2
VSCode version
1.97.2
Vue version
3.5.13
TypeScript version
5.7.3
System Info
package.json dependencies
Steps to reproduce
Create a component with slots get error message.
Resolved when slots defined with macro defineSlots
What is expected?
No errors
What is actually happening?
src/components/input/Input.vue:395:30 - error TS4081: Exported type alias '__VLS_Slots' has or is using private name '__VLS_0'.
395 & { leading?: (props: typeof __VLS_0) => any }
~~~~~~~
src/components/input/Input.vue:396:31 - error TS4081: Exported type alias '__VLS_Slots' has or is using private name '__VLS_1'.
396 & { trailing?: (props: typeof __VLS_1) => any }>;
~~~~~~~
src/components/modal/Modal.vue:338:30 - error TS4081: Exported type alias '__VLS_Slots' has or is using private name '__VLS_15'.
338 & { default?: (props: typeof __VLS_15) => any }>;
~~~~~~~~
Found 3 errors in 2 files.
Errors Files
2 src/components/input/Input.vue:395
1 src/components/modal/Modal.vue:338
Link to minimal reproduction
No response
Any additional comments?
i think this bug fix has something to do with it
#5139
The text was updated successfully, but these errors were encountered: