import { EventEmitter } from 'events' ; class ImportedFiles extends EventEmitter { files : string [ ] = [ ] ; on ( event , listener ) { return super . on ( event , listener ) ; } add ( path ) { this . files . push ( path ) ; this . emit ( 'file' ) ; } } export const importedFiles = new ImportedFiles ( ) ; /**
 * Watch files in importedFiles and trigger the callback when change detected
 */ export function watch ( callback ) { importedFiles . on ( 'file' , ( ) => { } ) ; }