import { BoxrecCommonTablesColumnsClass } from "../boxrec-common-tables/boxrec-common-tables-columns.class" ; import { BoxrecCommonTableHeader , getColumnDataByColumnHeader } from "../helpers" ; constructor export function IdGetter ( commonId = BoxrecCommonTableHeader . name ) { return target => { Object . defineProperty ( target . prototype , "id" , { get ( ) { return BoxrecCommonTablesColumnsClass . parseId ( getColumnDataByColumnHeader ( this . $ , this . headerColumns , BoxrecCommonTableHeader [ commonId ] ) ) as number ; } , } ) ; } ; } export interface IdInterface { readonly id : number ; }