@@ -11,7 +11,7 @@ namespace ts {
1111 write ( s : string ) : void ;
1212 readFile ( path : string , encoding ?: string ) : string ;
1313 writeFile ( path : string , data : string , writeByteOrderMark ?: boolean ) : void ;
14- watchFile ?( path : string , callback : FileWatcherCallback ) : FileWatcher ;
14+ watchFile ?( path : Path , callback : FileWatcherCallback ) : FileWatcher ;
1515 watchDirectory ?( path : string , callback : DirectoryWatcherCallback , recursive ?: boolean ) : FileWatcher ;
1616 resolvePath ( path : string ) : string ;
1717 fileExists ( path : string ) : boolean ;
@@ -500,13 +500,13 @@ namespace ts {
500500 } ,
501501 readFile,
502502 writeFile,
503- watchFile : ( fileName , callback ) => {
503+ watchFile : ( filePath , callback ) => {
504504 // Node 4.0 stablized the `fs.watch` function on Windows which avoids polling
505505 // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649
506506 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore
507507 // if the current node.js version is newer than 4, use `fs.watch` instead.
508508 const watchSet = isNode4OrLater ( ) ? watchedFileSet : pollingWatchedFileSet ;
509- const watchedFile = watchSet . addFile ( < Path > fileName , callback ) ;
509+ const watchedFile = watchSet . addFile ( filePath , callback ) ;
510510 return {
511511 close : ( ) => watchSet . removeFile ( watchedFile )
512512 } ;
0 commit comments