@@ -9,9 +9,9 @@ export function watchFiles(
9
9
cb : ( ) => void
10
10
) {
11
11
const tsConfig = typescript . getTypescriptConfig ( originalServicePath )
12
- let watchFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
12
+ let watchedFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
13
13
14
- watchFiles . forEach ( fileName => {
14
+ watchedFiles . forEach ( fileName => {
15
15
watchFile ( fileName , { persistent : true , interval : 250 } , watchCallback )
16
16
} )
17
17
@@ -25,18 +25,18 @@ export function watchFiles(
25
25
26
26
// use can reference not watched yet file or remove reference to already watched
27
27
const newWatchFiles = typescript . getSourceFiles ( rootFileNames , tsConfig )
28
- watchFiles . forEach ( fileName => {
28
+ watchedFiles . forEach ( fileName => {
29
29
if ( newWatchFiles . indexOf ( fileName ) < 0 ) {
30
30
unwatchFile ( fileName , watchCallback )
31
31
}
32
32
} )
33
33
34
34
newWatchFiles . forEach ( fileName => {
35
- if ( watchFiles . indexOf ( fileName ) < 0 ) {
35
+ if ( watchedFiles . indexOf ( fileName ) < 0 ) {
36
36
watchFile ( fileName , { persistent : true , interval : 250 } , watchCallback )
37
37
}
38
38
} )
39
39
40
- watchFiles = newWatchFiles
40
+ watchedFiles = newWatchFiles
41
41
}
42
42
}
0 commit comments