You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I think I have detected a typing error using hono and typed-htmx, ... when we create a component that receives the children property, if we decide to assign a type to that property (the Child type exported by hono), it causes a TypeScript error. You can see a test repo here:
So I checked out this error and here's the relevant part:
Types of property 'children' are incompatible.
Type 'Child' is not assignable to type '{} | undefined'.
Type 'null' is not assignable to type '{} | undefined'.
This can be a one-line fix in src/jsx.d.ts to accept null, as React does for children nodes.
Hello, I think I have detected a typing error using hono and typed-htmx, ... when we create a component that receives the children property, if we decide to assign a type to that property (the Child type exported by hono), it causes a TypeScript error. You can see a test repo here:
https://github.com/bertez/hono-typed-htmx-children/blob/main/src/index.tsx#L11
In that same repo, on line 11 of types.d.ts, you can see a temporary solution, but I'm not sure if that's the right approach.
https://github.com/bertez/hono-typed-htmx-children/blob/main/src/types.d.ts#L11
Thank you!
The text was updated successfully, but these errors were encountered: