File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ namespace ts.server.protocol {
7171 SignatureHelp = "signatureHelp" ,
7272 /* @internal */
7373 SignatureHelpFull = "signatureHelp-full" ,
74+ Status = "status" ,
7475 TypeDefinition = "typeDefinition" ,
7576 ProjectInfo = "projectInfo" ,
7677 ReloadProjects = "reloadProjects" ,
@@ -216,6 +217,27 @@ namespace ts.server.protocol {
216217 projectFileName ?: string ;
217218 }
218219
220+ /**
221+ * Requests status information from the server
222+ */
223+ export interface StatusRequest extends Request {
224+ command : CommandTypes . Status ;
225+ }
226+
227+ export interface StatusResponseBody {
228+ /**
229+ * the version of the currently-running server.
230+ */
231+ version : string ;
232+ }
233+
234+ /**
235+ * Response to StatusRequest
236+ */
237+ export interface StatusResponse extends Response {
238+ body : StatusResponseBody ;
239+ }
240+
219241 /**
220242 * Requests a JS Doc comment template for a given position
221243 */
Original file line number Diff line number Diff line change @@ -1703,6 +1703,10 @@ namespace ts.server {
17031703 }
17041704
17051705 private handlers = createMapFromTemplate < ( request : protocol . Request ) => HandlerResponse > ( {
1706+ [ CommandNames . Status ] : ( ) => {
1707+ const response : protocol . StatusResponseBody = { version } ;
1708+ return this . requiredResponse ( response ) ;
1709+ } ,
17061710 [ CommandNames . OpenExternalProject ] : ( request : protocol . OpenExternalProjectRequest ) => {
17071711 this . projectService . openExternalProject ( request . arguments , /*suppressRefreshOfInferredProjects*/ false ) ;
17081712 // TODO: report errors
You can’t perform that action at this time.
0 commit comments