logoalt Hacker News

tossandthrow04/01/20252 repliesview on HN

Neither HTML, nor CSS are naturally untyped.

Actually, React is not typed enough.

Looking at the mozilla docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sp...

You can see that eg. <span /> is not allowed to hold all types of elelemts.

How awsome weould it be, if th type system actually captures this.


Replies

zelphirkalt04/02/2025

I guess many web developers would climb on a roof and throw stones, because then they really needed to learn HTML and using its elements semantically. And probably many of their web components would no longer type check either, forcing them to reimplement or use simpler elements.

show 1 reply
tipiirai04/02/2025

This is a great idea!