File tree 3 files changed +18
-0
lines changed
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,9 @@ namespace Harness.LanguageService {
462
462
getNonBoundSourceFile ( fileName : string ) : ts . SourceFile {
463
463
throw new Error ( "SourceFile can not be marshaled across the shim layer." ) ;
464
464
}
465
+ getSourceFile ( fileName : string ) : ts . SourceFile {
466
+ throw new Error ( "SourceFile can not be marshaled across the shim layer." ) ;
467
+ }
465
468
dispose ( ) : void { this . shim . dispose ( { } ) ; }
466
469
}
467
470
Original file line number Diff line number Diff line change @@ -641,6 +641,10 @@ namespace ts.server {
641
641
throw new Error ( "SourceFile objects are not serializable through the server protocol." ) ;
642
642
}
643
643
644
+ getSourceFile ( fileName : string ) : SourceFile {
645
+ throw new Error ( "SourceFile objects are not serializable through the server protocol." ) ;
646
+ }
647
+
644
648
cleanupSemanticCache ( ) : void {
645
649
throw new Error ( "cleanupSemanticCache is not available through the server layer." ) ;
646
650
}
Original file line number Diff line number Diff line change @@ -1246,6 +1246,12 @@ namespace ts {
1246
1246
1247
1247
/* @internal */ getNonBoundSourceFile ( fileName : string ) : SourceFile ;
1248
1248
1249
+ /**
1250
+ * @internal
1251
+ * @deprecated Use ts.createSourceFile instead.
1252
+ */
1253
+ getSourceFile ( fileName : string ) : SourceFile ;
1254
+
1249
1255
dispose ( ) : void ;
1250
1256
}
1251
1257
@@ -7174,6 +7180,10 @@ namespace ts {
7174
7180
return syntaxTreeCache . getCurrentSourceFile ( fileName ) ;
7175
7181
}
7176
7182
7183
+ function getSourceFile ( fileName : string ) : SourceFile {
7184
+ return getNonBoundSourceFile ( fileName ) ;
7185
+ }
7186
+
7177
7187
function getNameOrDottedNameSpan ( fileName : string , startPos : number , endPos : number ) : TextSpan {
7178
7188
const sourceFile = syntaxTreeCache . getCurrentSourceFile ( fileName ) ;
7179
7189
@@ -8338,6 +8348,7 @@ namespace ts {
8338
8348
isValidBraceCompletionAtPosition,
8339
8349
getEmitOutput,
8340
8350
getNonBoundSourceFile,
8351
+ getSourceFile,
8341
8352
getProgram
8342
8353
} ;
8343
8354
}
You can’t perform that action at this time.
0 commit comments