Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: TS2345 [ERROR]: Argument of type VNode<{}> is not assignable to parameter of type preact.VNode<{}> #76

Open
silvioprog opened this issue Dec 13, 2022 · 0 comments

Comments

@silvioprog
Copy link

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/[email protected]/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/[email protected]/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/[email protected]/src/index.d.ts").ComponentClass<{}, {}>' is not assignable to type 'preact.ComponentClass<{}, {}>'.
          Types of property 'contextType' are incompatible.
            Type 'import("https://esm.sh/v99/[email protected]/src/index.d.ts").Context<any> | undefined' is not assignable to type 'preact.Context<any> | undefined'.
              Type 'import("https://esm.sh/v99/[email protected]/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/[email protected]/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/[email protected]/src/index.d.ts").RenderableProps<{ children: (value: any) => import("https://esm.sh/v99/[email protected]/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/[email protected]/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant