@@ -166,8 +166,7 @@ namespace Harness.LanguageService {
166166 throw new Error ( "No script with name '" + fileName + "'" ) ;
167167 }
168168
169- public openFile ( _fileName : string , _content ?: string , _scriptKindName ?: string ) : void {
170- }
169+ public openFile ( _fileName : string , _content ?: string , _scriptKindName ?: string ) : void { /*overridden*/ }
171170
172171 /**
173172 * @param line 0 based index
@@ -237,9 +236,9 @@ namespace Harness.LanguageService {
237236 }
238237
239238
240- log ( _ : string ) : void { }
241- trace ( _ : string ) : void { }
242- error ( _ : string ) : void { }
239+ log = ts . noop ;
240+ trace = ts . noop ;
241+ error = ts . noop ;
243242 }
244243
245244 export class NativeLanguageServiceAdapter implements LanguageServiceAdapter {
@@ -596,13 +595,8 @@ namespace Harness.LanguageService {
596595 super ( cancellationToken , settings ) ;
597596 }
598597
599- onMessage ( ) : void {
600-
601- }
602-
603- writeMessage ( ) : void {
604-
605- }
598+ onMessage = ts . noop ;
599+ writeMessage = ts . noop ;
606600
607601 setClient ( client : ts . server . SessionClient ) {
608602 this . client = client ;
@@ -628,13 +622,8 @@ namespace Harness.LanguageService {
628622 this . newLine = this . host . getNewLine ( ) ;
629623 }
630624
631- onMessage ( ) : void {
632-
633- }
634-
635- writeMessage ( _message : string ) : void {
636- }
637-
625+ onMessage = ts . noop ;
626+ writeMessage = ts . noop ; // overridden
638627 write ( message : string ) : void {
639628 this . writeMessage ( message ) ;
640629 }
@@ -648,8 +637,7 @@ namespace Harness.LanguageService {
648637 return snapshot && snapshot . getText ( 0 , snapshot . getLength ( ) ) ;
649638 }
650639
651- writeFile ( ) : void {
652- }
640+ writeFile = ts . noop ;
653641
654642 resolvePath ( path : string ) : string {
655643 return path ;
@@ -668,8 +656,7 @@ namespace Harness.LanguageService {
668656 return "" ;
669657 }
670658
671- exit ( ) : void {
672- }
659+ exit = ts . noop ;
673660
674661 createDirectory ( _directoryName : string ) : void {
675662 return ts . notImplemented ( ) ;
@@ -697,8 +684,7 @@ namespace Harness.LanguageService {
697684 return { close : ts . noop } ;
698685 }
699686
700- close ( ) : void {
701- }
687+ close = ts . noop ;
702688
703689 info ( message : string ) : void {
704690 this . host . log ( message ) ;
0 commit comments