import type { SugarElement } from '../node/SugarElement'; import * as SelectorFind from './SelectorFind'; const any = (selector: string): boolean => SelectorFind.first(selector).isSome(); const ancestor = (scope: SugarElement, selector: string, isRoot?: (e: SugarElement) => boolean): boolean => SelectorFind.ancestor(scope, selector, isRoot).isSome(); const sibling = (scope: SugarElement, selector: string): boolean => SelectorFind.sibling(scope, selector).isSome(); const child = (scope: SugarElement, selector: string): boolean => SelectorFind.child(scope, selector).isSome(); const descendant = (scope: SugarElement, selector: string): boolean => SelectorFind.descendant(scope, selector).isSome(); const closest = (scope: SugarElement, selector: string, isRoot?: (e: SugarElement) => boolean): boolean => SelectorFind.closest(scope, selector, isRoot).isSome(); export { any, ancestor, sibling, child, descendant, closest };