rename types
This commit is contained in:
@@ -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>;
|
||||
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user