Skip to content

Typecheck regression in 0.25.23 for unknown properties #284

Closed
@innocenzi

Description

@innocenzi

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).

Before (0.25.22)

After (0.25.23)

Activity

innocenzi

innocenzi commented on Jun 30, 2021

@innocenzi
Author

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

qiaozhu commented on Jun 30, 2021

@qiaozhu

me too, I'm back 0.25.22 it's ok.

johnsoncodehk

johnsoncodehk commented on Jun 30, 2021

@johnsoncodehk
Member

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.

You need to define __VLS_slots for third party libraries for now. See https://github.com/johnsoncodehk/volar#using.

innocenzi

innocenzi commented on Jun 30, 2021

@innocenzi
Author

Thanks! The solution works properly. Would Volar discover this if I PR it to HeadlessUI?

added a commit that references this issue on Jun 30, 2021
johnsoncodehk

johnsoncodehk commented on Jun 30, 2021

@johnsoncodehk
Member

@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

innocenzi commented on Jun 30, 2021

@innocenzi
Author

Alright, I won't PR it then. Thanks a lot for the info and your work. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Typecheck regression in 0.25.23 for unknown properties · Issue #284 · vuejs/language-tools