const cache = { } ; export const tpl = ( html ) : HTMLTemplateElement => { let template = cache [ html ] ; if ( ! template ) { template = document . createElement ( 'template' ) ; template . innerHTML = html ; cache [ html ] = template ; } return template ; } ; export const fire = ( target , type , detail ) : void => { target . dispatchEvent ( new CustomEvent ( type , { bubbles : true , detail } ) ) ; } ;