import type * as Moq from "@moq/net"; import type * as z from "zod/mini"; export interface Config { deltaRatio?: number; schema?: z.ZodMiniType; initial?: T; compression?: boolean; } /** Snapshot producer options, including the destination track. */ export type ProducerConfig = Config & { track: Moq.Track.Producer; }; /** Publishes a JSON value over a track, choosing snapshots and deltas automatically. */ export declare class Producer { #private; constructor(config: ProducerConfig); /** Publish a new value, emitting a snapshot or delta automatically. No-op if unchanged. */ update(value: T): void; /** * Mutate the current value in place and publish the result. * * The callback receives a deep clone of the last-published value, falling back to * {@link Config.initial} if nothing has been published yet (throws if neither exists). Edit it in * place; on return the result is published via {@link update}, a no-op if unchanged: * * ```ts * producer.mutate((catalog) => { * catalog.scte35 = { ... }; * }); * ``` * * Independent owners can share a single Producer and each edit only their own keys: every call * starts from the latest value, so sections compose instead of clobbering one another. Use * {@link update} to replace the whole value instead. */ mutate(fn: (value: T) => void): void; /** Finish the track, closing any open group. */ finish(): void; } //# sourceMappingURL=producer.d.ts.map