Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions src/server/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ import {
TypeAcquisition,
} from "./_namespaces/ts";

/**
* Declaration module describing the TypeScript Server protocol
*/
Comment on lines -22 to -24

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This JSDoc comment is on the wrong declaration now that we are modules; noticed this while working on the PR.

// Declaration module describing the TypeScript Server protocol

// NOTE: If updating this, be sure to also update `allCommandNames` in `testRunner/unittests/tsserver/session.ts`.
export const enum CommandTypes {
JsxClosingTag = "jsxClosingTag",
Brace = "brace",
Expand Down Expand Up @@ -175,8 +172,6 @@ export const enum CommandTypes {
ProvideCallHierarchyIncomingCalls = "provideCallHierarchyIncomingCalls",
ProvideCallHierarchyOutgoingCalls = "provideCallHierarchyOutgoingCalls",
ProvideInlayHints = "provideInlayHints"

// NOTE: If updating this, be sure to also update `allCommandNames` in `testRunner/unittests/tsserver/session.ts`.
}

/**
Expand Down
93 changes: 1 addition & 92 deletions src/testRunner/unittests/tsserver/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,98 +195,7 @@ describe("unittests:: tsserver:: Session:: General functionality", () => {
});

describe("onMessage", () => {
const allCommandNames: ts.server.protocol.CommandTypes[] = [
ts.server.protocol.CommandTypes.Brace,
ts.server.protocol.CommandTypes.BraceFull,
ts.server.protocol.CommandTypes.BraceCompletion,
ts.server.protocol.CommandTypes.Change,
ts.server.protocol.CommandTypes.Close,
ts.server.protocol.CommandTypes.Completions,
ts.server.protocol.CommandTypes.CompletionsFull,
ts.server.protocol.CommandTypes.CompletionDetails,
ts.server.protocol.CommandTypes.CompileOnSaveAffectedFileList,
ts.server.protocol.CommandTypes.Configure,
ts.server.protocol.CommandTypes.Definition,
ts.server.protocol.CommandTypes.DefinitionFull,
ts.server.protocol.CommandTypes.DefinitionAndBoundSpan,
ts.server.protocol.CommandTypes.DefinitionAndBoundSpanFull,
ts.server.protocol.CommandTypes.Implementation,
ts.server.protocol.CommandTypes.ImplementationFull,
ts.server.protocol.CommandTypes.Exit,
ts.server.protocol.CommandTypes.FileReferences,
ts.server.protocol.CommandTypes.FileReferencesFull,
ts.server.protocol.CommandTypes.Format,
ts.server.protocol.CommandTypes.Formatonkey,
ts.server.protocol.CommandTypes.FormatFull,
ts.server.protocol.CommandTypes.FormatonkeyFull,
ts.server.protocol.CommandTypes.FormatRangeFull,
ts.server.protocol.CommandTypes.Geterr,
ts.server.protocol.CommandTypes.GeterrForProject,
ts.server.protocol.CommandTypes.SemanticDiagnosticsSync,
ts.server.protocol.CommandTypes.SyntacticDiagnosticsSync,
ts.server.protocol.CommandTypes.SuggestionDiagnosticsSync,
ts.server.protocol.CommandTypes.NavBar,
ts.server.protocol.CommandTypes.NavBarFull,
ts.server.protocol.CommandTypes.Navto,
ts.server.protocol.CommandTypes.NavtoFull,
ts.server.protocol.CommandTypes.NavTree,
ts.server.protocol.CommandTypes.NavTreeFull,
ts.server.protocol.CommandTypes.Occurrences,
ts.server.protocol.CommandTypes.DocumentHighlights,
ts.server.protocol.CommandTypes.DocumentHighlightsFull,
ts.server.protocol.CommandTypes.JsxClosingTag,
ts.server.protocol.CommandTypes.Open,
ts.server.protocol.CommandTypes.Quickinfo,
ts.server.protocol.CommandTypes.QuickinfoFull,
ts.server.protocol.CommandTypes.References,
ts.server.protocol.CommandTypes.ReferencesFull,
ts.server.protocol.CommandTypes.Reload,
ts.server.protocol.CommandTypes.Rename,
ts.server.protocol.CommandTypes.RenameInfoFull,
ts.server.protocol.CommandTypes.RenameLocationsFull,
ts.server.protocol.CommandTypes.Saveto,
ts.server.protocol.CommandTypes.SignatureHelp,
ts.server.protocol.CommandTypes.SignatureHelpFull,
ts.server.protocol.CommandTypes.Status,
ts.server.protocol.CommandTypes.TypeDefinition,
ts.server.protocol.CommandTypes.ProjectInfo,
ts.server.protocol.CommandTypes.ReloadProjects,
ts.server.protocol.CommandTypes.Unknown,
ts.server.protocol.CommandTypes.OpenExternalProject,
ts.server.protocol.CommandTypes.CloseExternalProject,
ts.server.protocol.CommandTypes.SynchronizeProjectList,
ts.server.protocol.CommandTypes.ApplyChangedToOpenFiles,
ts.server.protocol.CommandTypes.EncodedSemanticClassificationsFull,
ts.server.protocol.CommandTypes.Cleanup,
ts.server.protocol.CommandTypes.GetOutliningSpans,
ts.server.protocol.CommandTypes.GetOutliningSpansFull,
ts.server.protocol.CommandTypes.TodoComments,
ts.server.protocol.CommandTypes.Indentation,
ts.server.protocol.CommandTypes.DocCommentTemplate,
ts.server.protocol.CommandTypes.CompilerOptionsDiagnosticsFull,
ts.server.protocol.CommandTypes.NameOrDottedNameSpan,
ts.server.protocol.CommandTypes.BreakpointStatement,
ts.server.protocol.CommandTypes.CompilerOptionsForInferredProjects,
ts.server.protocol.CommandTypes.GetCodeFixes,
ts.server.protocol.CommandTypes.GetCodeFixesFull,
ts.server.protocol.CommandTypes.GetSupportedCodeFixes,
ts.server.protocol.CommandTypes.GetApplicableRefactors,
ts.server.protocol.CommandTypes.GetEditsForRefactor,
ts.server.protocol.CommandTypes.GetEditsForRefactorFull,
ts.server.protocol.CommandTypes.OrganizeImports,
ts.server.protocol.CommandTypes.OrganizeImportsFull,
ts.server.protocol.CommandTypes.GetEditsForFileRename,
ts.server.protocol.CommandTypes.GetEditsForFileRenameFull,
ts.server.protocol.CommandTypes.SelectionRange,
ts.server.protocol.CommandTypes.PrepareCallHierarchy,
ts.server.protocol.CommandTypes.ProvideCallHierarchyIncomingCalls,
ts.server.protocol.CommandTypes.ProvideCallHierarchyOutgoingCalls,
ts.server.protocol.CommandTypes.ToggleLineComment,
ts.server.protocol.CommandTypes.ToggleMultilineComment,
ts.server.protocol.CommandTypes.CommentSelection,
ts.server.protocol.CommandTypes.UncommentSelection,
ts.server.protocol.CommandTypes.ProvideInlayHints
];
const allCommandNames: ts.server.protocol.CommandTypes[] = Object.values((ts.server.protocol as any).CommandTypes);

it("should not throw when commands are executed with invalid arguments", () => {
let i = 0;
Expand Down
3 changes: 0 additions & 3 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ declare namespace ts {
readonly kind: ActionSet;
}
namespace protocol {
/**
* Declaration module describing the TypeScript Server protocol
*/
enum CommandTypes {
JsxClosingTag = "jsxClosingTag",
Brace = "brace",
Expand Down