nicojs / typed-html

TypeSafe HTML templates using TypeScript. No need to learn a template library.
333 stars 51 forks source link

support doctype as a void element #20

Open ghost opened 3 years ago

ghost commented 3 years ago

hello! I use typed-html for the root template of my website server-side. however, as it does not seem to support the doctype tag, I have to add <!DOCTYPE html> as a string and append it to generated html. this works, but it feels like more of a hack than a proper solution. is it possible to add doctype void tag support, or is there something i'm missing here?

arthurfiorette commented 1 year ago

<!NAME> syntax is not a valid JSX syntax. Is far more easier just to add return "<!DOCTYPE html>" + html than creating a custom component for it.