Skip to content

Commit e55fbff

Browse files
committed
Rename the request as updateOpen
1 parent 03377f7 commit e55fbff

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/server/protocol.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ namespace ts.server.protocol {
9292
SynchronizeProjectList = "synchronizeProjectList",
9393
/* @internal */
9494
ApplyChangedToOpenFiles = "applyChangedToOpenFiles",
95-
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
95+
UpdateOpen = "updateOpen",
9696
/* @internal */
9797
EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full",
9898
/* @internal */
@@ -1547,15 +1547,15 @@ namespace ts.server.protocol {
15471547
/**
15481548
* Request to synchronize list of open files with the client
15491549
*/
1550-
export interface ApplyChangesToOpenFilesRequest extends Request {
1551-
command: CommandTypes.ApplyChangesToOpenFiles;
1552-
arguments: ApplyChangesToOpenFilesRequestArgs;
1550+
export interface UpdateOpenRequest extends Request {
1551+
command: CommandTypes.UpdateOpen;
1552+
arguments: UpdateOpenRequestArgs;
15531553
}
15541554

15551555
/**
1556-
* Arguments to ApplyChangesToOpenFilesRequest
1556+
* Arguments to UpdateOpenRequest
15571557
*/
1558-
export interface ApplyChangesToOpenFilesRequestArgs {
1558+
export interface UpdateOpenRequestArgs {
15591559
/**
15601560
* List of newly open files
15611561
*/

src/server/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ namespace ts.server {
20962096
});
20972097
return this.requiredResponse(converted);
20982098
},
2099-
[CommandNames.ApplyChangesToOpenFiles]: (request: protocol.ApplyChangesToOpenFilesRequest) => {
2099+
[CommandNames.UpdateOpen]: (request: protocol.UpdateOpenRequest) => {
21002100
this.changeSeq++;
21012101
this.projectService.applyChangesInOpenFiles(
21022102
request.arguments.openFiles && mapIterator(arrayIterator(request.arguments.openFiles), file => ({

src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ ${file.content}`;
105105
);
106106
});
107107

108-
it("with applyChangesToOpenFiles request", () => {
108+
it("with updateOpen request", () => {
109109
verify(session =>
110-
session.executeCommandSeq<protocol.ApplyChangesToOpenFilesRequest>({
111-
command: protocol.CommandTypes.ApplyChangesToOpenFiles,
110+
session.executeCommandSeq<protocol.UpdateOpenRequest>({
111+
command: protocol.CommandTypes.UpdateOpen,
112112
arguments: {
113113
openFiles: [
114114
{

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5720,7 +5720,7 @@ declare namespace ts.server.protocol {
57205720
OpenExternalProject = "openExternalProject",
57215721
OpenExternalProjects = "openExternalProjects",
57225722
CloseExternalProject = "closeExternalProject",
5723-
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
5723+
UpdateOpen = "updateOpen",
57245724
GetOutliningSpans = "getOutliningSpans",
57255725
TodoComments = "todoComments",
57265726
Indentation = "indentation",
@@ -6792,14 +6792,14 @@ declare namespace ts.server.protocol {
67926792
/**
67936793
* Request to synchronize list of open files with the client
67946794
*/
6795-
interface ApplyChangesToOpenFilesRequest extends Request {
6796-
command: CommandTypes.ApplyChangesToOpenFiles;
6797-
arguments: ApplyChangesToOpenFilesRequestArgs;
6795+
interface UpdateOpenRequest extends Request {
6796+
command: CommandTypes.UpdateOpen;
6797+
arguments: UpdateOpenRequestArgs;
67986798
}
67996799
/**
6800-
* Arguments to ApplyChangesToOpenFilesRequest
6800+
* Arguments to UpdateOpenRequest
68016801
*/
6802-
interface ApplyChangesToOpenFilesRequestArgs {
6802+
interface UpdateOpenRequestArgs {
68036803
/**
68046804
* List of newly open files
68056805
*/

0 commit comments

Comments
 (0)