@@ -9,9 +9,9 @@ export function watchFiles(
99 cb : ( ) => void
1010) {
1111 const tsConfig = typescript . getTypescriptConfig ( originalServicePath )
12- let watchFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
12+ let watchedFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
1313
14- watchFiles . forEach ( fileName => {
14+ watchedFiles . forEach ( fileName => {
1515 watchFile ( fileName , { persistent : true , interval : 250 } , watchCallback )
1616 } )
1717
@@ -25,18 +25,18 @@ export function watchFiles(
2525
2626 // use can reference not watched yet file or remove reference to already watched
2727 const newWatchFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
28- watchFiles . forEach ( fileName => {
28+ watchedFiles . forEach ( fileName => {
2929 if ( newWatchFiles . indexOf ( fileName ) < 0 ) {
3030 unwatchFile ( fileName , watchCallback )
3131 }
3232 } )
3333
3434 newWatchFiles . forEach ( fileName => {
35- if ( watchFiles . indexOf ( fileName ) < 0 ) {
35+ if ( watchedFiles . indexOf ( fileName ) < 0 ) {
3636 watchFile ( fileName , { persistent : true , interval : 250 } , watchCallback )
3737 }
3838 } )
3939
40- watchFiles = newWatchFiles
40+ watchedFiles = newWatchFiles
4141 }
4242}
0 commit comments