@@ -1191,36 +1191,36 @@ namespace ts.server {
1191
1191
}
1192
1192
1193
1193
private getDefinitionAndBoundSpan ( args : protocol . FileLocationRequestArgs , simplifiedResult : boolean ) : protocol . DefinitionInfoAndBoundSpan | DefinitionInfoAndBoundSpan {
1194
- const { file, project } = this . getFileAndProject ( args ) ;
1195
- const position = this . getPositionInFile ( args , file ) ;
1196
- const scriptInfo = Debug . checkDefined ( project . getScriptInfo ( file ) ) ;
1197
-
1198
- const unmappedDefinitionAndBoundSpan = project . getLanguageService ( ) . getDefinitionAndBoundSpan ( file , position ) ;
1199
-
1200
- if ( ! unmappedDefinitionAndBoundSpan || ! unmappedDefinitionAndBoundSpan . definitions ) {
1201
- return {
1202
- definitions : emptyArray ,
1203
- textSpan : undefined ! // TODO: GH#18217
1204
- } ;
1205
- }
1206
-
1207
- const definitions = this . mapDefinitionInfoLocations ( unmappedDefinitionAndBoundSpan . definitions , project ) ;
1208
- const { textSpan } = unmappedDefinitionAndBoundSpan ;
1209
-
1210
- if ( simplifiedResult ) {
1211
- return {
1212
- definitions : this . mapDefinitionInfo ( definitions , project ) ,
1213
- textSpan : toProtocolTextSpan ( textSpan , scriptInfo )
1214
- } ;
1215
- }
1216
-
1217
- return {
1218
- definitions : definitions . map ( Session . mapToOriginalLocation ) ,
1219
- textSpan,
1220
- } ;
1221
- }
1222
-
1223
- private getSourceDefinitionAndBoundSpan ( args : protocol . FileLocationRequestArgs , simplifiedResult : boolean ) : protocol . DefinitionInfoAndBoundSpan | DefinitionInfoAndBoundSpan {
1194
+ // const { file, project } = this.getFileAndProject(args);
1195
+ // const position = this.getPositionInFile(args, file);
1196
+ // const scriptInfo = Debug.checkDefined(project.getScriptInfo(file));
1197
+
1198
+ // const unmappedDefinitionAndBoundSpan = project.getLanguageService().getDefinitionAndBoundSpan(file, position);
1199
+
1200
+ // if (!unmappedDefinitionAndBoundSpan || !unmappedDefinitionAndBoundSpan.definitions) {
1201
+ // return {
1202
+ // definitions: emptyArray,
1203
+ // textSpan: undefined! // TODO: GH#18217
1204
+ // };
1205
+ // }
1206
+
1207
+ // const definitions = this.mapDefinitionInfoLocations(unmappedDefinitionAndBoundSpan.definitions, project);
1208
+ // const { textSpan } = unmappedDefinitionAndBoundSpan;
1209
+
1210
+ // if (simplifiedResult) {
1211
+ // return {
1212
+ // definitions: this.mapDefinitionInfo(definitions, project),
1213
+ // textSpan: toProtocolTextSpan(textSpan, scriptInfo)
1214
+ // };
1215
+ // }
1216
+
1217
+ // return {
1218
+ // definitions: definitions.map(Session.mapToOriginalLocation),
1219
+ // textSpan,
1220
+ // };
1221
+ // }
1222
+
1223
+ // private getSourceDefinitionAndBoundSpan(args: protocol.FileLocationRequestArgs, simplifiedResult: boolean): protocol.DefinitionInfoAndBoundSpan | DefinitionInfoAndBoundSpan {
1224
1224
const { file, project } = this . getFileAndProject ( args ) ;
1225
1225
const position = this . getPositionInFile ( args , file ) ;
1226
1226
const scriptInfo = Debug . checkDefined ( project . getScriptInfo ( file ) ) ;
@@ -2799,12 +2799,12 @@ namespace ts.server {
2799
2799
[ CommandNames . DefinitionAndBoundSpanFull ] : ( request : protocol . DefinitionAndBoundSpanRequest ) => {
2800
2800
return this . requiredResponse ( this . getDefinitionAndBoundSpan ( request . arguments , /*simplifiedResult*/ false ) ) ;
2801
2801
} ,
2802
- [ CommandNames . SourceDefinitionAndBoundSpan ] : ( request : protocol . SourceDefinitionAndBoundSpanRequest ) => {
2803
- return this . requiredResponse ( this . getSourceDefinitionAndBoundSpan ( request . arguments , /*simplifiedResult*/ true ) ) ;
2804
- } ,
2805
- [ CommandNames . SourceDefinitionAndBoundSpanFull ] : ( request : protocol . SourceDefinitionAndBoundSpanRequest ) => {
2806
- return this . requiredResponse ( this . getSourceDefinitionAndBoundSpan ( request . arguments , /*simplifiedResult*/ false ) ) ;
2807
- } ,
2802
+ // [CommandNames.SourceDefinitionAndBoundSpan]: (request: protocol.SourceDefinitionAndBoundSpanRequest) => {
2803
+ // return this.requiredResponse(this.getSourceDefinitionAndBoundSpan(request.arguments, /*simplifiedResult*/ true));
2804
+ // },
2805
+ // [CommandNames.SourceDefinitionAndBoundSpanFull]: (request: protocol.SourceDefinitionAndBoundSpanRequest) => {
2806
+ // return this.requiredResponse(this.getSourceDefinitionAndBoundSpan(request.arguments, /*simplifiedResult*/ false));
2807
+ // },
2808
2808
[ CommandNames . EmitOutput ] : ( request : protocol . EmitOutputRequest ) => {
2809
2809
return this . requiredResponse ( this . getEmitOutput ( request . arguments ) ) ;
2810
2810
} ,
0 commit comments