elysiajs / elysia-html

A plugin for Elysia that add support for returning html
MIT License
24 stars 18 forks source link

children prop is causing some type errors although it works correctly in runtime #10

Closed joetifa2003 closed 1 year ago

joetifa2003 commented 1 year ago

image

ethanniser commented 1 year ago

image kitajs/html has types that should solve this we just need to reexport them

arthurfiorette commented 1 year ago

Hey @ethanniser & @SaltyAom. I was looking through the source code and seems that there are things that can better integrate with @kitajs/html and how JSX works in general...

Would you mind on me opening a PR to improve them?

I do think that the safe mode should be more relevant inside the documentation. We don't want to go back to these old XSS php days.

Also, maybe we should work on re-use jsx.d.ts from @kitajs/html, duplicity would be bad here as it is a very long declaration file which could hide features/tags. (I did improve declarations in this latest release)

joetifa2003 commented 1 year ago

import { PropsWithChildren } from "@kitajs/html";

I added the package as a dep just to import the type, because i found no way to import this from Elysia html

joetifa2003 commented 1 year ago

Also i don't see a way to call @kitajs/html compile from this plugin

ethanniser commented 1 year ago

The plugin is just a couple days out of date with kita, if someone wants to make a pr it would not be that hard.

I might be able to later tonight

arthurfiorette commented 1 year ago

PR is already being done at #13