import { DomainError } from "../../../domain/general/general.types"; import { GitCommand } from "../../../domain/git-command/command.types"; import { ContextKey, ContextValue, Exist } from "../context.types"; declare type RemoteRepo = string; declare type Empty = "Empty"; export declare type Branch = string; declare type ConflictStatus = boolean; export interface GitContext { head?: Exist; unstagedChanges?: Exist; untrackedFiles?: Exist; stagedChanges?: Exist; remote?: RemoteRepo | Empty; currentBranch?: Branch | Empty; localBranches?: Branch[]; remoteBranches?: Branch[]; conflict?: ConflictStatus; } export declare type ContextValueOrError = ContextValue | DomainError; export declare type CmdOutputParser = (result: string) => ContextValueOrError; export declare type GitContextUpdater = (gitContext: GitContext) => GitContext; export declare type GitContextExaminer = (command: GitCommand, parser: GitOutputPattern) => GitContextUpdater; export interface GitOutputPattern { key: ContextKey; value: ContextValue; pattern: GitNormalPattern | GitErrorPattern; } export declare type GitErrorPattern = string; export declare type GitNormalPattern = string; export declare type GitContextUpdaterBuilder = (pattern: GitOutputPattern) => GitContextUpdater; export {};