# src/rove/core/preview_container.py
def has_child(self, selector: str) -> DOMNode | None:
"""
Check for whether this element contains this selector or not
Args:
selector(str): the selector to test
Returns:
bool: whether the selector is valid
"""
try:
return self.query_one(selector)
except NoMatches:
return None
Return type is DOMNode | None.
But why docs says return type is bool?
And why does it called has_child if it returns element?