import { ReadonlyCheckpoint } from "../checkpoint/base.js";
import { Checkpoint } from "../checkpoint/index.js";
export declare abstract class BaseChannel<ValueType = unknown, UpdateType = unknown, CheckpointType = unknown> {
    /**
     * The name of the channel.
     */
    abstract lc_graph_name: string;
    /**
     * Return a new identical channel, optionally initialized from a checkpoint.
     * Can be thought of as a "restoration" from a checkpoint which is a "snapshot" of the channel's state.
     *
     * @param {CheckpointType | undefined} checkpoint
     * @param {CheckpointType | undefined} initialValue
     * @returns {this}
     */
    abstract fromCheckpoint(checkpoint?: CheckpointType): this;
    /**
     * Update the channel's value with the given sequence of updates.
     * The order of the updates in the sequence is arbitrary.
     *
     * @throws {InvalidUpdateError} if the sequence of updates is invalid.
     * @param {Array<UpdateType>} values
     * @returns {void}
     */
    abstract update(values: UpdateType[]): void;
    /**
     * Return the current value of the channel.
     *
     * @throws {EmptyChannelError} if the channel is empty (never updated yet).
     * @returns {ValueType}
     */
    abstract get(): ValueType;
    /**
     * Return a string representation of the channel's current state.
     *
     * @throws {EmptyChannelError} if the channel is empty (never updated yet), or doesn't support checkpoints.
     * @returns {CheckpointType | undefined}
     */
    abstract checkpoint(): CheckpointType | undefined;
}
export declare function emptyChannels<Cc extends Record<string, BaseChannel>>(channels: Cc, checkpoint: ReadonlyCheckpoint): Cc;
export declare function createCheckpoint<ValueType>(checkpoint: ReadonlyCheckpoint, channels: Record<string, BaseChannel<ValueType>>, step: number): Checkpoint;
