Skip to content
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

TypeScript components type bug #3776

Closed
xiaoxiangmoe opened this issue Aug 23, 2022 · 1 comment
Closed

TypeScript components type bug #3776

xiaoxiangmoe opened this issue Aug 23, 2022 · 1 comment
Labels

Comments

@xiaoxiangmoe
Copy link
Contributor

Version

3.6.2

Steps to reproduce

import { defineComponent } from 'vue'
import VueRouter from 'vue-router' 
declare const Foo : () => {
  $props: {}
}
defineComponent({
  components: {
    // works well in both vue 2.7 and vue 3
    Foo
  },
})
new VueRouter({
  routes: [
    {
      // Type '() => { $props: {}; }' is not assignable to type 'Component | undefined'.
      component: Foo
    }
  ]
})
@posva
Copy link
Member

posva commented Aug 23, 2022

Please provide a real reproduction in Github. It shouldn't have a manual

declare const Foo : () => {
  $props: {}
}

either. This should come from a real component to see where the problem comes from

@posva posva added the invalid label Aug 23, 2022
@posva posva closed this as completed in 0cb86b3 Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants