import type { ValueCodec } from "./value-codec"; import * as pb from "../proto/handlerpb/handler_pb"; /** * ValueState manages a single named value with state tracking. * * ValueStates are created using the {@link topology.ValueSpec.stateFor} method. * * @typeParam T - The type of the value stored in the state */ export declare class ValueState { #private; /** * @ignore */ constructor(name: string, codec: ValueCodec, defaultValue: T, entries: pb.StateEntry[]); /** * Gets the name of this state value. * * @returns The state value name */ get name(): string; /** * Gets the current state value. * * @returns The current value */ get value(): T; /** * Sets a new value. * * @param value - The new value to store */ setValue(value: T): void; /** * Drops the value and resets it to the default value. * Dropped state will be deleted from the operator. */ drop(): void; }