JaroslavTulach commented on a change in pull request #2718:
URL: https://github.com/apache/netbeans/pull/2718#discussion_r567702175



##########
File path: java/java.lsp.server/vscode/src/extension.ts
##########
@@ -41,7 +41,7 @@ import * as launcher from './nbcode';
 import { StatusMessageRequest, ShowStatusMessageParams, QuickPickRequest, 
InputBoxRequest } from './protocol';
 
 const API_VERSION : string = "1.0";
-let client: Promise<LanguageClient>;
+let client: Promise<LanguageClient> | null = null;

Review comment:
       Ideally this `client` promise could be set soon to be defined (not 
`undefined`) and resolved later. That would mean to make sure the `client` 
promise is set sooner then `registerCommand` is registered. E.g. 
   ```
   let c : LanguageClient = await client
   ```
   can only be called when the `client` is defined.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to