import { Node } from 'typescript' ; import { findMatches } from '../match' ; import { TSQuerySelectorNode } from '../tsquery-types' ; export function child ( node , selector , ancestry ) { if ( findMatches ( node , selector . right , ancestry ) ) { return findMatches ( ancestry [ 0 ] , selector . left , ancestry . slice ( 1 ) ) ; } return false ; }