Subscribe on changes!

Using component with $props type breaks all typings.

avatar
Nov 16th 2021

Version

3.2.22

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Use a component which is made with $props type for example RouterView or Teleport, add it to components section you will have no type support.

What is expected?

Type support is expected.

What is actually happening?

Type support is not working.

image image image

avatar
Nov 20th 2021

@yuwu9145 What about custom components that use $props ?

avatar
Nov 21st 2021

@yuwu9145 What about custom components that use $props ?

based on my testing, custom component type still works. I also think ultimately it should be user's responsibility of making sure their custom component type serve as legitimate Component

image

@kadiryazici Do you have any sample code of using custom component that can replicate this issue?

avatar
Nov 23rd 2021

@yuwu9145 for example components that I created. https://github.com/teamseodo/simplebar-vue3/

avatar
Nov 23rd 2021

@kadiryazici your component works as per my testing image

avatar
Nov 23rd 2021

@yuwu9145 Why not working for mine :D 🤔 What version are you using?

avatar
Nov 23rd 2021

"vue": "^3.2.16"

avatar
Nov 23rd 2021

@yuwu9145 it might be because of different version. Mine was ^3.2.4 but it installed 3.2.19. I will use updated package.

avatar
Dec 6th 2021

FYI: built-in components still have type inference issue in defineComponent

image

avatar
Jan 29th 2022

This should be a bug and issue should be reopened