Skip to content

Commit

Permalink
refactor: Remove children from the type of createElement() since it…
Browse files Browse the repository at this point in the history
… is not used.
  • Loading branch information
usualoma committed Feb 9, 2024
1 parent afa40b8 commit 785341b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ createClient({
const { hydrateRoot } = await import('react-dom/client')
hydrateRoot(root, elem)
},
createElement: async (type: any, props: any, ...children: any[]) => {
createElement: async (type: any, props: any) => {
const { createElement } = await import('react')
return createElement(type, props, ...children)
return createElement(type, props)
},
})
```
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */

/** JSX */
export type CreateElement = (type: any, props: any, ...children: any[]) => Node | Promise<Node>
export type CreateElement = (type: any, props: any) => Node | Promise<Node>
export type Hydrate = (children: Node, parent: Element) => void | Promise<void>

0 comments on commit 785341b

Please sign in to comment.