Skip to content

Commit bafd287

Browse files
authored
Fix parameter ordering (#1485)
1 parent 5743f5e commit bafd287

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ After cloning the repository, run `npm install` to install dependencies and `npm
3939
- added proposed CodeActionKind.RefactorMove
4040
- snippet support in Workspace edits
4141
- support to control the parallelism of the dispatch requests and notification. This is a breaking change since it allows notification handlers to return a promise to control this.
42+
- make client browser implementation consistent with the node implementation in terms of arguments. This is a breaking change since it re-ordered parameter declarations.
4243

4344
## 3.17.5 Protocol, 9.0.1 Client and 9.0.1 Server
4445

client/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vscode-languageclient",
33
"description": "VSCode Language client implementation",
4-
"version": "10.0.0-next.6",
4+
"version": "10.0.0-next.7",
55
"author": "Microsoft Corporation",
66
"license": "MIT",
77
"engines": {

client/src/browser/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ export type ServerOptions = Worker | (() => Promise<Worker | MessageTransports>)
1414

1515
export class LanguageClient extends BaseLanguageClient {
1616

17-
private readonly options: ServerOptions;
17+
private readonly serverOptions: ServerOptions;
1818

19-
constructor(id: string, name: string, clientOptions: LanguageClientOptions, options: ServerOptions) {
19+
constructor(id: string, name: string, serverOptions: ServerOptions, clientOptions: LanguageClientOptions) {
2020
super(id, name, clientOptions);
21-
this.options = options;
21+
this.serverOptions = serverOptions;
2222
}
2323

2424
protected async createMessageTransports(_encoding: string): Promise<MessageTransports> {
25-
if (typeof this.options === 'function') {
26-
const result = await this.options();
25+
if (typeof this.serverOptions === 'function') {
26+
const result = await this.serverOptions();
2727
if (result instanceof Worker) {
2828
return this.createMessageTransportsFromWorker(result);
2929
} else {
3030
return result;
3131
}
3232
} else {
33-
return this.createMessageTransportsFromWorker(this.options);
33+
return this.createMessageTransportsFromWorker(this.serverOptions);
3434
}
3535
}
3636

0 commit comments

Comments
 (0)