/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { IdAllocator } from "../../util";
import { TaggedChange } from "../../core";
import { CrossFieldManager, NodeExistenceState, RevisionMetadataSource } from "../modular-schema";
import { Changeset, MarkList } from "./format";
/**
 * Rebases `change` over `base` assuming they both apply to the same initial state.
 * @param change - The changeset to rebase.
 * @param base - The changeset to rebase over.
 * @returns A changeset that performs the changes in `change` but does so assuming `base` has been applied first.
 *
 * WARNING! This implementation is incomplete:
 * - Some marks that affect existing content are removed instead of marked as conflicted when rebased over the deletion
 * of that content. This prevents us from then reinstating the mark when rebasing over the revive.
 * - Tombs are not added when rebasing an insert over a gap that is immediately left of deleted content.
 * This prevents us from being able to accurately track the position of the insert.
 * - Tiebreak ordering is not respected.
 * - Support for moves is not implemented.
 * - Support for slices is not implemented.
 */
export declare function rebase<TNodeChange>(change: Changeset<TNodeChange>, base: TaggedChange<Changeset<TNodeChange>>, rebaseChild: NodeChangeRebaser<TNodeChange>, genId: IdAllocator, manager: CrossFieldManager, revisionMetadata: RevisionMetadataSource, nodeExistenceState?: NodeExistenceState): Changeset<TNodeChange>;
export type NodeChangeRebaser<TNodeChange> = (change: TNodeChange | undefined, baseChange: TNodeChange | undefined, stateChange?: NodeExistenceState) => TNodeChange | undefined;
export declare function amendRebase<TNodeChange>(rebasedMarks: MarkList<TNodeChange>, baseMarks: TaggedChange<MarkList<TNodeChange>>, rebaseChild: NodeChangeRebaser<TNodeChange>, genId: IdAllocator, crossFieldManager: CrossFieldManager, revisionMetadata: RevisionMetadataSource): Changeset<TNodeChange>;
//# sourceMappingURL=rebase.d.ts.map