Closed
Description
Version
3.0.0-alpha.4
Reproduction link
https://codesandbox.io/s/boring-cerf-fkv0z
Steps to reproduce
In Typescript, use defineComponent
to create a component, then try to use it with .component('x-tag', MyComponent)
.
What is expected?
TS should compile (it does run).
What is actually happening?
There is a type error at compilation.
The problem seems to be that defineComponent
is lying about its return type. It says that it returns a constructor, which is not true since it is mostly a noop (it returns its parameter directly, which is an object).
createApp
accepts this because it seems to accept constructors in addition to components. But .component()
does not.
Metadata
Metadata
Assignees
Labels
No labels