let warnings = [ ] ; export function recordWarning ( ... warn ) { warnings . push ( warn ) ; } export function getWarnings ( ) { if ( warnings . length > 0 ) { const result = warnings . map ( warn => `- ${ warn . join ( '\n  ' ) }` ) ; warnings = [ ] ; return result ; } }