import type { FsStage, InsertResult } from "../fs-stage/fs-stage.js";
import type { Result } from "../result/result.js";
import type { CommitFailureReason } from "../fs-stage/commit.js";
import type { YarnFixFailureReason } from "../yarn/fix.js";
import type { PrettierFixFailureReason } from "../prettier/fix.js";
import type { Project } from "./project.js";
export type Update = FsStageUpdate | DirectUpdate;
export interface FsStageUpdate {
    readonly type: "fs-stage-update";
    readonly log: string;
    readonly breaking?: readonly string[] | undefined;
    readonly apply: (stage: FsStage) => Promise<InsertResult>;
    readonly updatedProject?: Project | undefined;
}
export interface DirectUpdate {
    readonly type: "direct-update";
    readonly log: string;
    readonly breaking?: readonly string[] | undefined;
    readonly apply: () => Promise<Result<UpdateStepFailureReason>>;
    readonly updatedProject?: Project | undefined;
}
export type UpdateResult = Result<UpdateFailureReason, Project>;
export type UpdateFailureReason = GitNotClean | CommitFailureReason | UpdateStepFailureReason;
export type UpdateStepFailureReason = YarnFixFailureReason | PrettierFixFailureReason;
export interface UpdateProjectOptions {
    readonly project: Project;
    readonly breaking?: boolean | undefined;
}
export declare function updateProject(options: UpdateProjectOptions): Promise<UpdateResult>;
export interface GitNotClean {
    readonly type: "git-not-clean";
    readonly path: string;
}
export declare function gitNotClean(path: string): GitNotClean;
