import { isNotNull } from '@typed/logic' ; import { Nothing } from '@typed/maybe' ; import { CombinedEnvsOf , HtmlTagName , HtmlVNode , PropsFrom , VNode , VNodeProps , VNodeType , } from '../../model/VNode' ; export function html < E extends { } , A extends HtmlTagName = HtmlTagName , B extends ReadonlyArray < VNode | null > = ReadonlyArray < VNode | null > > ( tagName , props , children ) { return { type : VNodeType . Html , tagName , props , children : children . filter ( isNotNull ) , node : props ?. ref ?? { current : Nothing } , listener : { current : Nothing } , } ; } export function isHtml ( vNode ) { return vNode . type === VNodeType . Html ; }