Based on the function name, we should be able to append child to anything that can take children, right?
Due to the current typing
function appendChild(elem: Element, child: ChildNode): void
I get a type error with the following code
const doc = new Document([]);
const newHtmlElement = new Element('html', {}, undefined, ElementType.Tag);
appendChild(doc, newHtmlElement);
The code runs fine however typescript complains since Document is not an Element;
I think the typing is incorrect and should be
function appendChild(elem: NodeWithChildren, child: ChildNode): void
but correct me if I'm misunderstanding