You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this was wanted, but "unknown" props now give an error. This icon component is not known by Volar (it's dynamically included via vite-plugin-components without TypeScript support enabled).
@innocenzi yes volar will discover slots type if you define __VLS_slots to library. But I don't recommend you do this, because __VLS_slots is not official vue interface, and it will be replaced in the future.
Activity
innocenzi commentedon Jun 30, 2021
I'm not sure if it's related, but I have an error in the popover component's
v-slot
:This component comes from Headless UI:
I don't think I had this issue before, but it seems that 0.25.22 still triggers the error for the popover.
EDIT - After trying every version, the issue is introduced in 0.25.11 and is not present in 0.25.10.
qiaozhu commentedon Jun 30, 2021
me too, I'm back 0.25.22 it's ok.
johnsoncodehk commentedon Jun 30, 2021
You need to define
__VLS_slots
for third party libraries for now. See https://github.com/johnsoncodehk/volar#using.innocenzi commentedon Jun 30, 2021
Thanks! The solution works properly. Would Volar discover this if I PR it to HeadlessUI?
fix: typecheck third-party props
johnsoncodehk commentedon Jun 30, 2021
@innocenzi yes volar will discover slots type if you define
__VLS_slots
to library. But I don't recommend you do this, because__VLS_slots
is not official vue interface, and it will be replaced in the future.innocenzi commentedon Jun 30, 2021
Alright, I won't PR it then. Thanks a lot for the info and your work. 👍