File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -248,11 +248,6 @@ namespace ts.server {
248248 this . send ( res ) ;
249249 }
250250
251- private getLocation ( position : number , scriptInfo : ScriptInfo ) : protocol . Location {
252- const { line, offset } = scriptInfo . positionToLineOffset ( position ) ;
253- return { line, offset : offset + 1 } ;
254- }
255-
256251 private semanticCheck ( file : NormalizedPath , project : Project ) {
257252 try {
258253 const diags = project . getLanguageService ( ) . getSemanticDiagnostics ( file ) ;
@@ -366,8 +361,8 @@ namespace ts.server {
366361 length : d . length ,
367362 category : DiagnosticCategory [ d . category ] . toLowerCase ( ) ,
368363 code : d . code ,
369- startLocation : scriptInfo && this . getLocation ( d . start , scriptInfo ) ,
370- endLocation : scriptInfo && this . getLocation ( d . start + d . length , scriptInfo )
364+ startLocation : scriptInfo && scriptInfo . positionToLineOffset ( d . start ) ,
365+ endLocation : scriptInfo && scriptInfo . positionToLineOffset ( d . start + d . length )
371366 } ) ;
372367 }
373368
You can’t perform that action at this time.
0 commit comments