From ce50a2620a0d0a1eb9ab169c0fec9dd97c1ef49b Mon Sep 17 00:00:00 2001 From: Anas sarkiz Date: Fri, 1 Nov 2024 21:51:38 +0200 Subject: [PATCH] Fixed type errors --- lib/create-host-config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/create-host-config.ts b/lib/create-host-config.ts index 3397bac..4959035 100644 --- a/lib/create-host-config.ts +++ b/lib/create-host-config.ts @@ -47,7 +47,7 @@ export function createHostConfig(jscad: JSCADModule) { .filter(React.isValidElement) .map((child) => createInstance( - child.type, + child.type as string | ((props: any) => any), child.props, [], hostContext, @@ -59,7 +59,7 @@ export function createHostConfig(jscad: JSCADModule) { if (React.isValidElement(children)) { return [ createInstance( - children.type, + children.type as string | ((props: any) => any), children.props, [], hostContext, @@ -296,7 +296,7 @@ export function createHostConfig(jscad: JSCADModule) { // Convert the base component (first child) to JSCAD geometry const baseGeometry = createInstance( - validChildren[0].type, + validChildren[0].type as string | ((props: any) => any), validChildren[0].props, rootContainerInstance, hostContext, @@ -309,7 +309,7 @@ export function createHostConfig(jscad: JSCADModule) { .slice(1) .map((child) => createInstance( - child.type, + child.type as string | ((props: any) => any), child.props, rootContainerInstance, hostContext,