mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 14:34:35 -06:00
Rename the request as updateOpen
This commit is contained in:
parent
03377f70b7
commit
e55fbffed6
@ -92,7 +92,7 @@ namespace ts.server.protocol {
|
||||
SynchronizeProjectList = "synchronizeProjectList",
|
||||
/* @internal */
|
||||
ApplyChangedToOpenFiles = "applyChangedToOpenFiles",
|
||||
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
|
||||
UpdateOpen = "updateOpen",
|
||||
/* @internal */
|
||||
EncodedSemanticClassificationsFull = "encodedSemanticClassifications-full",
|
||||
/* @internal */
|
||||
@ -1547,15 +1547,15 @@ namespace ts.server.protocol {
|
||||
/**
|
||||
* Request to synchronize list of open files with the client
|
||||
*/
|
||||
export interface ApplyChangesToOpenFilesRequest extends Request {
|
||||
command: CommandTypes.ApplyChangesToOpenFiles;
|
||||
arguments: ApplyChangesToOpenFilesRequestArgs;
|
||||
export interface UpdateOpenRequest extends Request {
|
||||
command: CommandTypes.UpdateOpen;
|
||||
arguments: UpdateOpenRequestArgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Arguments to ApplyChangesToOpenFilesRequest
|
||||
* Arguments to UpdateOpenRequest
|
||||
*/
|
||||
export interface ApplyChangesToOpenFilesRequestArgs {
|
||||
export interface UpdateOpenRequestArgs {
|
||||
/**
|
||||
* List of newly open files
|
||||
*/
|
||||
|
||||
@ -2096,7 +2096,7 @@ namespace ts.server {
|
||||
});
|
||||
return this.requiredResponse(converted);
|
||||
},
|
||||
[CommandNames.ApplyChangesToOpenFiles]: (request: protocol.ApplyChangesToOpenFilesRequest) => {
|
||||
[CommandNames.UpdateOpen]: (request: protocol.UpdateOpenRequest) => {
|
||||
this.changeSeq++;
|
||||
this.projectService.applyChangesInOpenFiles(
|
||||
request.arguments.openFiles && mapIterator(arrayIterator(request.arguments.openFiles), file => ({
|
||||
|
||||
@ -105,10 +105,10 @@ ${file.content}`;
|
||||
);
|
||||
});
|
||||
|
||||
it("with applyChangesToOpenFiles request", () => {
|
||||
it("with updateOpen request", () => {
|
||||
verify(session =>
|
||||
session.executeCommandSeq<protocol.ApplyChangesToOpenFilesRequest>({
|
||||
command: protocol.CommandTypes.ApplyChangesToOpenFiles,
|
||||
session.executeCommandSeq<protocol.UpdateOpenRequest>({
|
||||
command: protocol.CommandTypes.UpdateOpen,
|
||||
arguments: {
|
||||
openFiles: [
|
||||
{
|
||||
|
||||
@ -5720,7 +5720,7 @@ declare namespace ts.server.protocol {
|
||||
OpenExternalProject = "openExternalProject",
|
||||
OpenExternalProjects = "openExternalProjects",
|
||||
CloseExternalProject = "closeExternalProject",
|
||||
ApplyChangesToOpenFiles = "applyChangesToOpenFiles",
|
||||
UpdateOpen = "updateOpen",
|
||||
GetOutliningSpans = "getOutliningSpans",
|
||||
TodoComments = "todoComments",
|
||||
Indentation = "indentation",
|
||||
@ -6792,14 +6792,14 @@ declare namespace ts.server.protocol {
|
||||
/**
|
||||
* Request to synchronize list of open files with the client
|
||||
*/
|
||||
interface ApplyChangesToOpenFilesRequest extends Request {
|
||||
command: CommandTypes.ApplyChangesToOpenFiles;
|
||||
arguments: ApplyChangesToOpenFilesRequestArgs;
|
||||
interface UpdateOpenRequest extends Request {
|
||||
command: CommandTypes.UpdateOpen;
|
||||
arguments: UpdateOpenRequestArgs;
|
||||
}
|
||||
/**
|
||||
* Arguments to ApplyChangesToOpenFilesRequest
|
||||
* Arguments to UpdateOpenRequest
|
||||
*/
|
||||
interface ApplyChangesToOpenFilesRequestArgs {
|
||||
interface UpdateOpenRequestArgs {
|
||||
/**
|
||||
* List of newly open files
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user