export function child ( element , selector ) { if ( ! element || ! selector ) return null ; return element . querySelector ( selector ) as HTMLElement ; } export function children ( selector , parent ? ) { if ( ! parent ) { parent = document . body ; } return Array . prototype . slice . call ( parent . querySelectorAll ( selector ) ) ; }