rename types

This commit is contained in:
Robert
2023-03-22 15:37:39 +00:00
parent 0e79b92829
commit 5d6a2e6d7f
2 changed files with 6 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ export type SingleSelectionCommandFunction<Item> = (
// Builtin commands where the implementation is provided by VS Code and not by this extension.
// See https://code.visualstudio.com/api/references/commands
export type VSCodeCommands = {
export type BuiltInVsCodeCommands = {
"markdown.showPreviewToSide": (uri: Uri) => Promise<void>;
"workbench.action.reloadWindow": () => Promise<void>;
};
@@ -220,7 +220,7 @@ export type MockGitHubApiServerCommands = {
};
// All commands where the implementation is provided by this extension.
export type AllCodeQLCommands = BaseCommands &
export type AllExtensionCommands = BaseCommands &
QueryHistoryCommands &
LocalDatabasesCommands &
VariantAnalysisCommands &
@@ -232,7 +232,7 @@ export type AllCodeQLCommands = BaseCommands &
SummaryLanguageSupportCommands &
MockGitHubApiServerCommands;
export type AllCommands = AllCodeQLCommands & VSCodeCommands;
export type AllCommands = AllExtensionCommands & BuiltInVsCodeCommands;
export type AppCommandManager = CommandManager<AllCommands>;

View File

@@ -112,7 +112,7 @@ import { redactableError } from "./pure/errors";
import { QueryHistoryDirs } from "./query-history/query-history-dirs";
import { DirResult } from "tmp";
import {
AllCodeQLCommands,
AllExtensionCommands,
BaseCommands,
QueryServerCommands,
} from "./common/commands";
@@ -837,7 +837,7 @@ async function activateWithInstalledDistribution(
void extLogger.log("Registering top-level command palette commands.");
const allCommands: AllCodeQLCommands = {
const allCommands: AllExtensionCommands = {
...getCommands(cliServer, qs),
...localQueryResultsView.getCommands(),
...qhm.getCommands(),
@@ -864,7 +864,7 @@ async function activateWithInstalledDistribution(
};
for (const [commandName, command] of Object.entries(allCommands)) {
app.commands.register(commandName as keyof AllCodeQLCommands, command);
app.commands.register(commandName as keyof AllExtensionCommands, command);
}
const queryServerCommands: QueryServerCommands = {