/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldChangeRebaser, FieldKindWithEditor } from "../../../feature-libraries/modular-schema/index.js";
import { ChangeEncodingContext, DeltaFieldChanges } from "../../../core/index.js";
import { Multiplicity } from "../../../feature-libraries/index.js";
/**
 * Picks the last value written.
 *
 * TODO: it seems impossible for this to obey the desired axioms.
 * Specifically inverse needs to cancel, restoring the value from the previous change which was discarded.
 */
export declare function lastWriteWinsRebaser<TChange>(data: {
    noop: TChange;
    invert: (changes: TChange) => TChange;
}): FieldChangeRebaser<TChange>;
export interface Replacement<T> {
    old: T;
    new: T;
}
export type ReplaceOp<T> = Replacement<T> | 0;
/**
 * Picks the last value written.
 *
 * Consistent if used on valid paths with correct old states.
 */
export declare function replaceRebaser<T>(): FieldChangeRebaser<ReplaceOp<T>>;
export type ValueChangeset = ReplaceOp<number>;
export declare const valueHandler: {
    rebaser: FieldChangeRebaser<ReplaceOp<number>>;
    codecsFactory: () => import("../../../codec/codec.js").ICodecFamily<ValueChangeset, ChangeEncodingContext>;
    editor: {
        buildChildChange: (index: number, change: import("../../../feature-libraries/index.js").NodeChangeset) => never;
    };
    intoDelta: ({ change, revision }: import("../../../core/index.js").TaggedChange<ValueChangeset>) => DeltaFieldChanges;
    relevantRemovedRoots: (change: import("../../../core/index.js").TaggedChange<ValueChangeset>) => never[];
    isEmpty: (change: ValueChangeset) => boolean;
    createEmpty: () => 0;
};
export declare const valueField: FieldKindWithEditor<{
    buildChildChange: (index: number, change: import("../../../feature-libraries/index.js").NodeChangeset) => never;
}, Multiplicity.Single, "Value">;
//# sourceMappingURL=basicRebasers.d.ts.map