Open ashmortar opened 3 months ago
You need to manually import it if you want to use types.
I'll see what I can do to replicate 4.1.0 behavior's, but its a problem with current's typescript version and the register.d.ts file.
However I don't have enough time for now, are you able to start a PR?
Prerequisites
Versions
4.2.0, 4.2.1
Description
I am having this same issue for 4.2.0 and 4.2.1 using express and node in any
tsx
file in my project.example:
Error at Html reported by typescript:
Error at
{children}
Steps to Reproduce
Create a project
export function Link({ class: className, children, ...rest }: Html.PropsWithChildren) {
const props =
href
in rest ? { ...rest, target: "_blank", rel: "noopener noreferrer" } : rest; const ourClass = className ? className : "link";return ( <a class={ourClass} {...props}> {children} ); }
Expected Behavior
Namespace should be recognized in the file as it is if you install
@kitajs/html@4.1.0