diff --git a/src/commands/gitCommands.utils.ts b/src/commands/gitCommands.utils.ts index ba08392..2cf9da2 100644 --- a/src/commands/gitCommands.utils.ts +++ b/src/commands/gitCommands.utils.ts @@ -3,7 +3,7 @@ import { configuration } from '../configuration'; import { ContextKeys } from '../constants'; import type { Container } from '../container'; import { getContext } from '../context'; -import type { Usage } from '../storage'; +import type { RecentUsage } from '../storage'; import { BranchGitCommand } from './git/branch'; import { CherryPickGitCommand } from './git/cherry-pick'; import { CoAuthorsGitCommand } from './git/coauthors'; @@ -140,7 +140,7 @@ export class PickCommandStep implements QuickPickStep { private async updateCommandUsage(id: string, timestamp: number) { let usage = this.container.storage.getWorkspace(`gitComandPalette:usage`); if (usage === undefined) { - usage = Object.create(null) as Usage; + usage = Object.create(null) as RecentUsage; } usage[id] = timestamp; diff --git a/src/storage.ts b/src/storage.ts index ab1939d..65f54c4 100644 --- a/src/storage.ts +++ b/src/storage.ts @@ -144,17 +144,13 @@ export interface WorkspaceStorage { branch: { comparisons?: StoredBranchComparisons; }; - connected: { - [key: string]: boolean; - }; + connected: Record; gitComandPalette: { - usage?: Usage; + usage?: RecentUsage; }; gitPath?: string; graph: { - columns?: { - [key: string]: GraphColumnConfig; - }; + columns?: Record; preview?: boolean; }; remote: { @@ -234,18 +230,9 @@ export interface StoredPinnedSearch { } export type StoredPinnedItem = StoredPinnedComparison | StoredPinnedSearch; - -export interface StoredPinnedItems { - [id: string]: StoredPinnedItem; -} - -export interface StoredStarred { - [id: string]: boolean; -} - -export interface Usage { - [id: string]: number; -} +export type StoredPinnedItems = Record; +export type StoredStarred = Record; +export type RecentUsage = Record; interface DeprecatedPinnedComparison { path: string;