/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { Delta, ITreeCursor, TaggedChange, ChangesetLocalId } from "../../core";
import { ToDelta, FieldChangeRebaser, FieldEditor, FieldChangeHandler } from "../modular-schema";
import { OptionalChangeset } from "./defaultFieldChangeTypes";
export declare const optionalChangeRebaser: FieldChangeRebaser<OptionalChangeset>;
export interface OptionalFieldEditor extends FieldEditor<OptionalChangeset> {
    /**
     * Creates a change which replaces the field with `newContent`
     * @param newContent - the new content for the field
     * @param wasEmpty - whether the field is empty when creating this change
     * @param changeId - the ID associated with the replacement of the current content.
     * @param buildId - the ID associated with the creation of the `newContent`.
     */
    set(newContent: ITreeCursor, wasEmpty: boolean, changeId: ChangesetLocalId, buildId: ChangesetLocalId): OptionalChangeset;
    /**
     * Creates a change which clears the field's contents (if any).
     * @param wasEmpty - whether the field is empty when creating this change
     * @param changeId - the ID associated with the change.
     */
    clear(wasEmpty: boolean, changeId: ChangesetLocalId): OptionalChangeset;
}
export declare const optionalFieldEditor: OptionalFieldEditor;
export declare function optionalFieldIntoDelta({ change, revision }: TaggedChange<OptionalChangeset>, deltaFromChild: ToDelta): Delta.FieldChanges;
export declare const optionalChangeHandler: FieldChangeHandler<OptionalChangeset, OptionalFieldEditor>;
//# sourceMappingURL=optionalField.d.ts.map