@@ -1191,36 +1191,36 @@ namespace ts.server {
11911191 }
11921192
11931193 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 {
12241224 const { file, project } = this . getFileAndProject ( args ) ;
12251225 const position = this . getPositionInFile ( args , file ) ;
12261226 const scriptInfo = Debug . checkDefined ( project . getScriptInfo ( file ) ) ;
@@ -2799,12 +2799,12 @@ namespace ts.server {
27992799 [ CommandNames . DefinitionAndBoundSpanFull ] : ( request : protocol . DefinitionAndBoundSpanRequest ) => {
28002800 return this . requiredResponse ( this . getDefinitionAndBoundSpan ( request . arguments , /*simplifiedResult*/ false ) ) ;
28012801 } ,
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+ // },
28082808 [ CommandNames . EmitOutput ] : ( request : protocol . EmitOutputRequest ) => {
28092809 return this . requiredResponse ( this . getEmitOutput ( request . arguments ) ) ;
28102810 } ,
0 commit comments