You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,17 @@ After cloning the repository, run `npm install` to install dependencies and `npm
38
38
39
39
Library specific changes are:
40
40
41
-
- cleanup of client `start` and `stop` methods. Both methods now return a promise since these methods are async. This is a breaking change since start returned a disposable before. Extensions should now implement a deactivate function in their extension main file and correctly return the `stop` promise from the deactivate call. As a consequence the `onReady()` got removed since extensions can await the `start()` call (even multiple times).
41
+
- cleanup of client `start` and `stop` methods. Both methods now return a promise since these methods are async. This is a breaking change since start returned a disposable before. Extensions should now implement a deactivate function in their extension main file and correctly return the `stop` promise from the deactivate call. As a consequence the `onReady()` got removed since extensions can await the `start()` call now. Old code like this
42
+
```typescript
43
+
const client:LanguageClient=...;
44
+
client.start();
45
+
awaitclient.onReady();
46
+
```
47
+
should become:
48
+
```typescript
49
+
const client:LanguageClient=...;
50
+
awaitclient.start();
51
+
```
42
52
- notification and request handler registration can now happen before the client is started. This ensures that no messages from the server are missed.
43
53
- if an extension sends a notification or request before the client got started the client will auto start.
44
54
- all `sendNotification` methods now return a promise. Returning a promise was necessary since the actual writing of the message to the underlying transport is async and a client for example could not determine if a notification was handed off to the transport. This is a breaking change in the sense that it might result in floating promise and might be flagged by a linter.
0 commit comments