export const getElementNo = ( el ? ) : number | undefined => { if ( ! el ) { return undefined ; } const noStr = el . getAttribute ( "data-no" ) ; return noStr ? parseInt ( noStr , 10 ) : undefined ; } ; export const appendElement = ( parent , child ) : Element => parent . appendChild ( child ) ; export const prependElement = ( parent , child ) : Element => parent . insertBefore ( child , parent . firstChild ) ;