export class MusicSheetErrors { public measureErrors : { [ n ] : string [ ] ; } = { } ; private errors : string [ ] = [ ] ; private tempErrors : string [ ] = [ ] ; public finalizeMeasure ( measureNumber ) { let list = this . measureErrors [ measureNumber ] ; if ( ! list ) { list = [ ] ; } this . measureErrors [ measureNumber ] = list . concat ( this . tempErrors ) ; this . tempErrors = [ ] ; } public pushMeasureError ( errorMsg ) { this . tempErrors . push ( errorMsg ) ; } public push ( errorMsg ) { this . errors . push ( errorMsg ) ; } }