-
-
Notifications
You must be signed in to change notification settings - Fork 388
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
fallthroughAttributes
breaks checking with dynamic components
#4814
Comments
This is a bug caused by some differences in |
@KazariEX Awesome to hear it should not be as difficult as initially expected to get this fixed! 🎉 Thank you very much for your triaging 🚀. |
I suggest you can use This applies to all built-in components, and by entering the source definition from workaround: <script setup lang="ts">
import { Transition, TransitionProps, TransitionGroup, DefineComponent } from 'vue';
const VTransition = Transition as unknown as DefineComponent<TransitionProps>;
</script>
<template>
<component :is="0 ? VTransition : TransitionGroup"></component>
</template> |
Vue - Official extension or vue-tsc version
2.1.6
VSCode version
1.92.2
Vue version
3.5.1
TypeScript version
5.5.4
System Info
No response
package.json dependencies
Listed the ones used in the reproduction
Steps to reproduce
npm run check
. 2 errors will be reportedJTransition
file to eitherTransition
orTransitionGroup
. Checking will pass as expected.What is expected?
JTransition
fallthroughAttributes is the union of the types of the:is
expression in dynamic components (ideally, it also creates a type based on the truthiness of the passed expression if it depends on props, but probably that's a limitation impossible to be solved properly in all the underlying use cases. I think the union of them is fine already).What is actually happening?
All the type information of the
JTransition
component is missing::is
expression of the underlying component.Link to minimal reproduction
https://stackblitz.com/edit/vue3-vite-typescript-starter-ywtm6e?file=src%2FApp.vue
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: