import { DomainError, Unit } from "../general/general.types"; import { Command, ExecuteGitCommand } from "../git-command/command.types"; import { CmdContext } from "./cmd-context/cmd-context.types"; import { GitContext, CmdOutputParser } from "./git-context/git-context.types"; import * as T from "fp-ts/Task"; export interface Context { git: GitContext; cmd: CmdContext; } export declare type ContextDomain = keyof Context; export declare type ContextField = keyof GitContext | keyof CmdContext; export interface ContextKey { domain: ContextDomain; field: ContextField; } export declare type ContextValue = boolean | string | string[]; export declare type Exist = boolean; export declare type GetContext = () => Context; export declare type SetContext = (context: Context) => Unit; export declare type HowToCheck = { git: { [key in keyof GitContext]: CommandAndParser; }; cmd: { [key in keyof CmdContext]: CommandAndParser; }; }; export declare type CheckContext = (excuteGitCommand: ExecuteGitCommand) => (key: ContextKey) => T.Task; export interface CommandAndParser { command: Command; parser: CmdOutputParser; }