error: TS2345 [ERROR]: Argument of type VNode<{}> is not assignable to parameter of type preact.VNode<{}>
silvioprog opened this issue · comments
Environment
% deno --version
deno 1.28.3 (release, aarch64-apple-darwin)
v8 10.9.194.5
typescript 4.8.3
Error
% deno test
Check file:///~/sift/test.ts
error: TS2345 [ERROR]: Argument of type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").VNode<{}>' is not assignable to parameter of type 'preact.VNode<{}>'.
Types of property 'type' are incompatible.
Type 'string | import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").ComponentType<{}>' is not assignable to type 'string | preact.ComponentType<{}>'.
Type 'ComponentClass<{}, {}>' is not assignable to type 'string | ComponentType<{}>'.
Type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").ComponentClass<{}, {}>' is not assignable to type 'preact.ComponentClass<{}, {}>'.
Types of property 'contextType' are incompatible.
Type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").Context<any> | undefined' is not assignable to type 'preact.Context<any> | undefined'.
Type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").Context<any>' is not assignable to type 'preact.Context<any>'.
Types of property 'Consumer' are incompatible.
Type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").Consumer<any>' is not assignable to type 'preact.Consumer<any>'.
Types of parameters 'props' and 'props' are incompatible.
Type 'preact.RenderableProps<{ children: (value: any) => preact.ComponentChildren; }, any>' is not assignable to type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").RenderableProps<{ children: (value: any) => import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").ComponentChildren; }, any>'.
Type 'RenderableProps<{ children: (value: any) => ComponentChildren; }, any>' is not assignable to type 'Readonly<Attributes & { children?: ComponentChildren; ref?: Ref<any> | undefined; }>'.
Types of property 'ref' are incompatible.
Type 'preact.Ref<any> | undefined' is not assignable to type 'import("https://esm.sh/v99/preact@10.10.6/src/index.d.ts").Ref<any> | undefined'.
Type 'null' is not assignable to type 'Ref<any> | undefined'.
return new Response(renderToString(jsx), {
~~~
at file:///~/sift/mod.ts:281:38