File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ namespace ts.server.protocol {
71
71
SignatureHelp = "signatureHelp" ,
72
72
/* @internal */
73
73
SignatureHelpFull = "signatureHelp-full" ,
74
+ Status = "status" ,
74
75
TypeDefinition = "typeDefinition" ,
75
76
ProjectInfo = "projectInfo" ,
76
77
ReloadProjects = "reloadProjects" ,
@@ -216,6 +217,27 @@ namespace ts.server.protocol {
216
217
projectFileName ?: string ;
217
218
}
218
219
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
+
219
241
/**
220
242
* Requests a JS Doc comment template for a given position
221
243
*/
Original file line number Diff line number Diff line change @@ -1703,6 +1703,10 @@ namespace ts.server {
1703
1703
}
1704
1704
1705
1705
private handlers = createMapFromTemplate < ( request : protocol . Request ) => HandlerResponse > ( {
1706
+ [ CommandNames . Status ] : ( ) => {
1707
+ const response : protocol . StatusResponseBody = { version } ;
1708
+ return this . requiredResponse ( response ) ;
1709
+ } ,
1706
1710
[ CommandNames . OpenExternalProject ] : ( request : protocol . OpenExternalProjectRequest ) => {
1707
1711
this . projectService . openExternalProject ( request . arguments , /*suppressRefreshOfInferredProjects*/ false ) ;
1708
1712
// TODO: report errors
You can’t perform that action at this time.
0 commit comments