import { Node } from 'typescript' ; import { findMatches } from '../match' ; import { TSQuerySelectorNode } from '../tsquery-types' ; export function matches ( modifier ) { return function ( node , selector , ancestry ) : boolean { return selector . selectors [ modifier ] ( childSelector => { return findMatches ( node , childSelector , ancestry ) ; } ) ; } ; }