import { BoxrecPageLocationEventRow } from "../boxrec-pages/location/event/boxrec.page.location.event.row" ; import { BoxrecPageLocationBoxerRow } from "../boxrec-pages/location/people/boxrec.page.location.boxer.row" ; import { BoxrecPageLocationPeopleRow } from "../boxrec-pages/location/people/boxrec.page.location.people.row" ; import { BoxrecPageProfileEventRow } from "../boxrec-pages/profile/boxrec.page.profile.event.row" ; import { BoxrecPageVenueEventsRow } from "../boxrec-pages/venue/boxrec.page.venue.events.row" ; import { getHeaderColumnText } from "../helpers" ; param getter param classType param tableEl constructor export function ListingsGetter ( getter , classType , tableEl ) { return target => { Object . defineProperty ( target . prototype , getter , { returns get < T > ( ) { const headerColumns = getHeaderColumnText ( this . $ ( tableEl ) ) ; return this . $ ( tableEl ) . find ( "tbody tr" ) . map ( ( index , elem ) => this . $ ( elem ) . html ( ) || "" ) . get ( ) . map ( ( item ) => new classType ( headerColumns , item ) ) ; } , } ) ; } ; } export interface ListingsInterface { readonly events ? : BoxrecPageProfileEventRow [ ] | BoxrecPageVenueEventsRow [ ] | BoxrecPageLocationEventRow [ ] ; readonly people ? : BoxrecPageLocationBoxerRow [ ] | BoxrecPageLocationPeopleRow [ ] ; }