export default class BranchStore { remote: string; hasRunPreprocess: boolean; remoteBranches: Array; /** * Local branches which track remote branches that no longer exist */ localOrphanedBranches: Array<{ localBranch: string; remoteBranch: string; }>; /** * Branches that are still in use; will never be deleted */ liveBranches: Set; /** * Should be offered for deletion, will need force */ unmergedBranches: Set; /** * Current branch (cannot be deleted) */ currentBranch: string; /** * Protected branches that should never be deleted */ protectedBranches: Set; /** * Branches that have never been pushed to remote */ neverPushedBranches: Set; /** * Branches that are merged into current branch */ mergedBranches: Array; /** * Safe to delete (pre-selected in UI) */ safeToDelete: Array; /** * Requires force to delete (NOT pre-selected in UI) */ requiresForce: Array; /** * Will not be deleted: local branches still tracking remote branches with different names (disabled in UI) */ infoOnly: Array; /** * Map of branch name to last commit timestamp (seconds since epoch) */ lastCommitTimes: Map; /** * These are the branches that the app will offer to delete */ staleBranches: Array; queuedForDeletion: Array; queuedForForceDeletion: Array; failedToDelete: Array<{ branch: string; error: string; }>; /** * All branches, including their upstream info */ allBranches: Array; noConnection: boolean; constructor(ops?: { remote?: string; protected?: string; }); setQueuedForDeletion(safe: Array, force: Array): void; preprocess(): Promise; private fetchRemote; /** * Uses "git ls-remote" to find branches that are still available on the remote and store them in liveBranches state */ lookupLiveBranches(): Promise; findAllBranches(): Promise; findLocalOrphanedBranches(): void; lookupUnmergedBranches(): Promise; lookupRemoteBranches(): Promise; getCurrentBranch(): Promise; findNeverPushedBranches(): void; lookupMergedBranches(): Promise; lookupLastCommitTimes(): Promise; classifyBranches(): void; /** * Get a short reason why a branch is in the safe-to-delete category */ getSafeToDeleteReason(branch: string): string; /** * Get a short reason why a branch requires force delete */ getRequiresForceReason(branch: string): string; /** * Get a short reason why a branch is info-only */ getInfoOnlyReason(branch: string): string; getDeletableBranches(): Promise; deleteBranches(): Promise<{ success: string[]; failed: Array<{ branch: string; error: string; }>; }>; }