File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -658,7 +658,7 @@ namespace ts {
658658 const start = new Date ( ) . getTime ( ) ;
659659 ensureDirectoriesExist ( getDirectoryPath ( normalizePath ( fileName ) ) ) ;
660660
661- if ( options . watch && sys . createHash && sys . getModifiedTime ) {
661+ if ( isWatchSet ( options ) && sys . createHash && sys . getModifiedTime ) {
662662 writeFileIfUpdated ( fileName , data , writeByteOrderMark ) ;
663663 }
664664 else {
Original file line number Diff line number Diff line change @@ -240,11 +240,6 @@ namespace ts {
240240 return typeof JSON === "object" && typeof JSON . parse === "function" ;
241241 }
242242
243- function isWatchSet ( options : CompilerOptions ) {
244- // Firefox has Object.prototype.watch
245- return options . watch && options . hasOwnProperty ( "watch" ) ;
246- }
247-
248243 export function executeCommandLine ( args : string [ ] ) : void {
249244 const commandLine = parseCommandLine ( args ) ;
250245 let configFileName : string ; // Configuration file name (if any)
Original file line number Diff line number Diff line change @@ -2642,6 +2642,11 @@ namespace ts {
26422642 }
26432643 return carriageReturnLineFeed ;
26442644 }
2645+
2646+ export function isWatchSet ( options : CompilerOptions ) {
2647+ // Firefox has Object.prototype.watch
2648+ return options . watch && options . hasOwnProperty ( "watch" ) ;
2649+ }
26452650}
26462651
26472652namespace ts {
You can’t perform that action at this time.
0 commit comments