Skip to content

Commit

Permalink
Merge pull request #87 from anas-sarkez/main
Browse files Browse the repository at this point in the history
Fixed type errors
  • Loading branch information
AnasSarkiz authored Nov 1, 2024
2 parents 01728e0 + ce50a26 commit 2b7d194
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/create-host-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 2b7d194

Please sign in to comment.