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.
|
// Builtin commands where the implementation is provided by VS Code and not by this extension.
|
||||||
// See https://code.visualstudio.com/api/references/commands
|
// See https://code.visualstudio.com/api/references/commands
|
||||||
export type VSCodeCommands = {
|
export type BuiltInVsCodeCommands = {
|
||||||
"markdown.showPreviewToSide": (uri: Uri) => Promise<void>;
|
"markdown.showPreviewToSide": (uri: Uri) => Promise<void>;
|
||||||
"workbench.action.reloadWindow": () => Promise<void>;
|
"workbench.action.reloadWindow": () => Promise<void>;
|
||||||
};
|
};
|
||||||
@@ -220,7 +220,7 @@ export type MockGitHubApiServerCommands = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// All commands where the implementation is provided by this extension.
|
// All commands where the implementation is provided by this extension.
|
||||||
export type AllCodeQLCommands = BaseCommands &
|
export type AllExtensionCommands = BaseCommands &
|
||||||
QueryHistoryCommands &
|
QueryHistoryCommands &
|
||||||
LocalDatabasesCommands &
|
LocalDatabasesCommands &
|
||||||
VariantAnalysisCommands &
|
VariantAnalysisCommands &
|
||||||
@@ -232,7 +232,7 @@ export type AllCodeQLCommands = BaseCommands &
|
|||||||
SummaryLanguageSupportCommands &
|
SummaryLanguageSupportCommands &
|
||||||
MockGitHubApiServerCommands;
|
MockGitHubApiServerCommands;
|
||||||
|
|
||||||
export type AllCommands = AllCodeQLCommands & VSCodeCommands;
|
export type AllCommands = AllExtensionCommands & BuiltInVsCodeCommands;
|
||||||
|
|
||||||
export type AppCommandManager = CommandManager<AllCommands>;
|
export type AppCommandManager = CommandManager<AllCommands>;
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ import { redactableError } from "./pure/errors";
|
|||||||
import { QueryHistoryDirs } from "./query-history/query-history-dirs";
|
import { QueryHistoryDirs } from "./query-history/query-history-dirs";
|
||||||
import { DirResult } from "tmp";
|
import { DirResult } from "tmp";
|
||||||
import {
|
import {
|
||||||
AllCodeQLCommands,
|
AllExtensionCommands,
|
||||||
BaseCommands,
|
BaseCommands,
|
||||||
QueryServerCommands,
|
QueryServerCommands,
|
||||||
} from "./common/commands";
|
} from "./common/commands";
|
||||||
@@ -837,7 +837,7 @@ async function activateWithInstalledDistribution(
|
|||||||
|
|
||||||
void extLogger.log("Registering top-level command palette commands.");
|
void extLogger.log("Registering top-level command palette commands.");
|
||||||
|
|
||||||
const allCommands: AllCodeQLCommands = {
|
const allCommands: AllExtensionCommands = {
|
||||||
...getCommands(cliServer, qs),
|
...getCommands(cliServer, qs),
|
||||||
...localQueryResultsView.getCommands(),
|
...localQueryResultsView.getCommands(),
|
||||||
...qhm.getCommands(),
|
...qhm.getCommands(),
|
||||||
@@ -864,7 +864,7 @@ async function activateWithInstalledDistribution(
|
|||||||
};
|
};
|
||||||
|
|
||||||
for (const [commandName, command] of Object.entries(allCommands)) {
|
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 = {
|
const queryServerCommands: QueryServerCommands = {
|
||||||
|
|||||||
Reference in New Issue
Block a user