import Page from './Page' ; const pageNumbersForTest = ( pages , test ) : number [ ] => { return pages . filter ( pg => ! ! pg . number ) . filter ( pg => test ( pg . element ) ) . map ( pg => pg . number as number ) ; } ; const pageNumbersForSelector = ( pages , selector ) => { return pageNumbersForTest ( pages , ( el ) => { return ! ! el . querySelector ( selector ) ; } ) ; } ; export { pageNumbersForTest , pageNumbersForSelector } ;