Closed KnifeFed closed 2 years ago
Having the same issue. Although adding React types removes the complaints in tsx files, VM.m
and other VM functions do not accept JSX.Element
but its own types.
No overload matches this call.
Overload 1 of 2, '(vnode: VChild): Node', gave the following error.
Argument of type 'Element' is not assignable to parameter of type 'VChild'.
Property 'vtype' is missing in type 'ReactElement<any, any>' but required in type 'VNode'.
Overload 2 of 2, '(vnode: VChildren[]): Node[]', gave the following error.
Argument of type 'Element' is not assignable to parameter of type 'VChildren[]'.
Type 'ReactElement<any, any>' is missing the following properties from type 'VChildren[]': length, pop, push, concat, and 29 more.ts(2769)
types.d.ts(8, 5): 'vtype' is declared here.
I got this for all JSX elements. After doing a
yarn add --dev @types/react-dom
it disappeared.