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
Try to compile h(comp as Component, { id: 'ok' }) or h(comp as Component<{ id: string }>, { id: 'ok' })
What is expected?
Should compile
What is actually happening?
Type 'ComponentOptions<...>' is not assignable to type 'ComponentPublicInstanceConstructor<...>
A test was created for #922 but the case with props has // @ts-expect-error
Component should behave the same as DefineComponent and FunctionalComponent:
Allow extraneous props
Require non-optional props if Props is provided
Probably related: TSX throws TS2604: JSX element type 'component' does not have any construct or call signatures. if you try to use a Component with it.
The text was updated successfully, but these errors were encountered:
Version
3.0.5
Reproduction link
https://codesandbox.io/s/blissful-sun-gqg87
Steps to reproduce
Try to compile
h(comp as Component, { id: 'ok' })
orh(comp as Component<{ id: string }>, { id: 'ok' })
What is expected?
Should compile
What is actually happening?
Type 'ComponentOptions<...>' is not assignable to type 'ComponentPublicInstanceConstructor<...>
A test was created for #922 but the case with props has
// @ts-expect-error
Component
should behave the same asDefineComponent
andFunctionalComponent
:Props
is providedProbably related: TSX throws
TS2604: JSX element type 'component' does not have any construct or call signatures.
if you try to use aComponent
with it.The text was updated successfully, but these errors were encountered: