/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Skip, Transposed as T } from "./format";
export declare function isAttach(mark: T.Mark): mark is T.Attach;
export declare function isReattach(mark: T.Mark): mark is T.Reattach | T.ModifyReattach;
export declare function isTomb(mark: T.Mark): mark is T.Tomb;
export declare function isGapEffectMark(mark: T.Mark): mark is T.GapEffectSegment;
export declare function getAttachLength(attach: T.Attach): number;
/**
 * @returns `true` iff `lhs` and `rhs` are deeply structurally equal.
 */
export declare function isEqualGaps(lhs: T.GapEffect[] | undefined, rhs: T.GapEffect[] | undefined): boolean;
/**
 * @returns `true` iff `lhs` and `rhs`'s `HasPlaceFields` fields are structurally equal.
 */
export declare function isEqualPlace(lhs: Readonly<T.HasPlaceFields>, rhs: Readonly<T.HasPlaceFields>): boolean;
export declare function isEqualGapEffect(lhs: Readonly<T.GapEffect>, rhs: Readonly<T.GapEffect>): boolean;
/**
 * @param mark - The mark to get the length of.
 * @returns The number of nodes within the output context of the mark.
 */
export declare function getOutputLength(mark: T.Mark): number;
/**
 * @param mark - The mark to get the length of.
 * @returns The number of nodes within the input context of the mark.
 */
export declare function getInputLength(mark: T.Mark): number;
export declare function isSkipMark(mark: T.Mark): mark is Skip;
/**
 * Splits the `mark` into two marks such that the first returned mark has input length `length`.
 * @param mark - The mark to split.
 * @param length - The desired length for the first of the two returned marks.
 * @returns A pair of marks equivalent to the original `mark`
 * such that the first returned mark has input length `length`.
 */
export declare function splitMarkOnInput<TMark extends T.SizedMark>(mark: TMark, length: number): [TMark, TMark];
/**
 * Splits the `mark` into two marks such that the first returned mark has output length `length`.
 * @param mark - The mark to split.
 * @param length - The desired length for the first of the two returned marks.
 * @returns A pair of marks equivalent to the original `mark`
 * such that the first returned mark has output length `length`.
 */
export declare function splitMarkOnOutput<TMark extends T.Mark>(mark: TMark, length: number): [TMark, TMark];
export declare function isDetachMark(mark: T.Mark | undefined): mark is T.Detach | T.ModifyDetach;
export declare function isObjMark(mark: T.Mark | undefined): mark is T.ObjectMark;
/**
 * Attempts to extend `lhs` to include the effects of `rhs`.
 * @param lhs - The mark to extend.
 * @param rhs - The effect so extend `rhs` with.
 * @returns `true` iff the function was able to mutate `lhs` to include the effects of `rhs`.
 * When `false` is returned, `lhs` is left untouched.
 */
export declare function tryExtendMark(lhs: T.ObjectMark, rhs: Readonly<T.ObjectMark>): boolean;
//# sourceMappingURL=utils.d.ts.map