export class StringBuilder { private lines : string [ ] = [ ] ; addLine ( line ) { this . lines . push ( line ) ; } dump ( ) { const data = this . lines . join ( '\n' ) + '\n' ; this . lines = [ ] ; return data ; } }