ts-migrate-server
Version:
A package that contains the main migration runner and spawns a TSServer process
134 lines • 5.86 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.commandHasResponse = exports.CommandTypes = void 0;
// Because the `const enum` from 'typescript/lib/protocol' doesn't get inlined with transpile only.
exports.CommandTypes = {
JsxClosingTag: 'jsxClosingTag',
Brace: 'brace',
BraceCompletion: 'braceCompletion',
GetSpanOfEnclosingComment: 'getSpanOfEnclosingComment',
Change: 'change',
Close: 'close',
/** @deprecated Prefer CompletionInfo -- see comment on CompletionsResponse */
Completions: 'completions',
CompletionInfo: 'completionInfo',
CompletionDetails: 'completionEntryDetails',
CompileOnSaveAffectedFileList: 'compileOnSaveAffectedFileList',
CompileOnSaveEmitFile: 'compileOnSaveEmitFile',
Configure: 'configure',
Definition: 'definition',
DefinitionAndBoundSpan: 'definitionAndBoundSpan',
Implementation: 'implementation',
Exit: 'exit',
Format: 'format',
Formatonkey: 'formatonkey',
Geterr: 'geterr',
GeterrForProject: 'geterrForProject',
SemanticDiagnosticsSync: 'semanticDiagnosticsSync',
SyntacticDiagnosticsSync: 'syntacticDiagnosticsSync',
SuggestionDiagnosticsSync: 'suggestionDiagnosticsSync',
NavBar: 'navbar',
Navto: 'navto',
NavTree: 'navtree',
NavTreeFull: 'navtree-full',
/** @deprecated */
Occurrences: 'occurrences',
DocumentHighlights: 'documentHighlights',
Open: 'open',
Quickinfo: 'quickinfo',
References: 'references',
Reload: 'reload',
Rename: 'rename',
Saveto: 'saveto',
SignatureHelp: 'signatureHelp',
Status: 'status',
TypeDefinition: 'typeDefinition',
ProjectInfo: 'projectInfo',
ReloadProjects: 'reloadProjects',
Unknown: 'unknown',
OpenExternalProject: 'openExternalProject',
OpenExternalProjects: 'openExternalProjects',
CloseExternalProject: 'closeExternalProject',
UpdateOpen: 'updateOpen',
GetOutliningSpans: 'getOutliningSpans',
TodoComments: 'todoComments',
Indentation: 'indentation',
DocCommentTemplate: 'docCommentTemplate',
CompilerOptionsForInferredProjects: 'compilerOptionsForInferredProjects',
GetCodeFixes: 'getCodeFixes',
GetCombinedCodeFix: 'getCombinedCodeFix',
ApplyCodeActionCommand: 'applyCodeActionCommand',
GetSupportedCodeFixes: 'getSupportedCodeFixes',
GetApplicableRefactors: 'getApplicableRefactors',
GetEditsForRefactor: 'getEditsForRefactor',
OrganizeImports: 'organizeImports',
GetEditsForFileRename: 'getEditsForFileRename',
ConfigurePlugin: 'configurePlugin',
};
const COMMAND_HAS_RESPONSE = {
[]: true,
[]: true,
[]: false,
[]: false,
[]: false,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: false,
[]: false,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: false,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: false,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
[]: true,
};
function commandHasResponse(command) {
// @ts-ignore ts-migrate(7053) FIXME: Property '[CommandTypes.SelectionRange]' does not ... Remove this comment to see the full error message
return COMMAND_HAS_RESPONSE[command];
}
exports.commandHasResponse = commandHasResponse;
//# sourceMappingURL=commands.js.map