Skip to content

TypeScript components type bug #3776

Closed
Closed
@xiaoxiangmoe

Description

@xiaoxiangmoe

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
    }
  ]
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions