/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { JsonCompatibleReadOnly } from "../../util";
import { FieldChangeHandler, NodeChangeset, NodeChangeComposer, IdAllocator, RevisionMetadataSource } from "./fieldChangeHandler";
import { FieldKind } from "./fieldKind";
/**
 * A field-kind-agnostic change to a single node within a field.
 */
export interface GenericChange {
    /**
     * Index within the field of the changed node.
     */
    index: number;
    /**
     * Change to the node.
     */
    nodeChange: NodeChangeset;
}
/**
 * Encoded version of {@link GenericChange}
 */
export interface EncodedGenericChange {
    index: number;
    nodeChange: JsonCompatibleReadOnly;
}
/**
 * A field-agnostic set of changes to the elements of a field.
 */
export declare type GenericChangeset = GenericChange[];
/**
 * Encoded version of {@link GenericChangeset}
 */
export declare type EncodedGenericChangeset = EncodedGenericChange[];
/**
 * {@link FieldChangeHandler} implementation for {@link GenericChangeset}.
 */
export declare const genericChangeHandler: FieldChangeHandler<GenericChangeset>;
/**
 * {@link FieldKind} used to represent changes to elements of a field in a field-kind-agnostic format.
 */
export declare const genericFieldKind: FieldKind;
/**
 * Converts a {@link GenericChangeset} into a field-kind-specific `TChange`.
 * @param changeset - The generic changeset to convert.
 * @param target - The {@link FieldChangeHandler} for the `FieldKind` that the returned change should target.
 * @param composeChild - A delegate to compose {@link NodeChangeset}s.
 * @returns An equivalent changeset as represented by the `target` field-kind.
 */
export declare function convertGenericChange<TChange>(changeset: GenericChangeset, target: FieldChangeHandler<TChange>, composeChild: NodeChangeComposer, genId: IdAllocator, revisionMetadata: RevisionMetadataSource): TChange;
export declare function newGenericChangeset(): GenericChangeset;
//# sourceMappingURL=genericFieldKind.d.ts.map