You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: