JetBrains / web-types

JSON standard for documenting web component libraries for IDEs, documentation generators and other tools
Apache License 2.0
278 stars 25 forks source link

incorrect type definition for Vue component :is #67

Closed tp-nicholas closed 1 year ago

tp-nicholas commented 1 year ago

I posted to StackOverflow looking for where I could find the Vue types for ComponentDefinition and/or ComponentConstructor. There, I was told that those are pseudo-types used only in the documentation. Specifically, they appear only for the type accepted by a component's :is prop.

PhpStorm's Web Types seem to also believe these are actual types. When I properly type my argument to :is as a Component, the IDE complains Type Component is not assignable to type string | ComponentDefinition.

piotrtomiak commented 1 year ago

@tp-nicholas - thanks for posting the issue. Please follow https://youtrack.jetbrains.com/issue/WEB-60534 for updates. This is a simple fix and it should land in 2023.1.2.