File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -456,6 +456,7 @@ namespace ts {
456456 setTimeout ?( callback : ( ...args : any [ ] ) => void , ms : number , ...args : any [ ] ) : any ;
457457 clearTimeout ?( timeoutId : any ) : void ;
458458 clearScreen ?( ) : void ;
459+ /*@internal */ setBlocking ?( ) : void ;
459460 }
460461
461462 export interface FileWatcher {
@@ -614,6 +615,11 @@ namespace ts {
614615 clearTimeout,
615616 clearScreen : ( ) => {
616617 process . stdout . write ( "\x1Bc" ) ;
618+ } ,
619+ setBlocking : ( ) => {
620+ if ( process . stdout && process . stdout . _handle && process . stdout . _handle . setBlocking ) {
621+ process . stdout . _handle . setBlocking ( true ) ;
622+ }
617623 }
618624 } ;
619625 return nodeSystem ;
Original file line number Diff line number Diff line change @@ -399,8 +399,9 @@ if (ts.Debug.isDebugging) {
399399if ( ts . sys . tryEnableSourceMapsForHost && / ^ d e v e l o p m e n t $ / i. test ( ts . sys . getEnvironmentVariable ( "NODE_ENV" ) ) ) {
400400 ts . sys . tryEnableSourceMapsForHost ( ) ;
401401}
402- declare var process : any ;
403- if ( process && process . stdout && process . stdout . _handle && process . stdout . _handle . setBlocking ) {
404- process . stdout . _handle . setBlocking ( true ) ;
402+
403+ if ( ts . sys . setBlocking ) {
404+ ts . sys . setBlocking ( ) ;
405405}
406+
406407ts . executeCommandLine ( ts . sys . args ) ;
You can’t perform that action at this time.
0 commit comments