import { Container, ContainerID, LoroEventBatch, TreeID } from "loro-crdt"; import { SchemaType } from "../schema/index.js"; type MirrorStatePrimitive = string | number | boolean | null | undefined | {}; type MirrorState = MirrorStatePrimitive | MirrorStateObject | MirrorState[]; interface MirrorStateObject { [k: string]: MirrorState; } /** * Apply a Loro event batch to a JSON-like state object. * Returns a new state object (using immer) with deltas applied. */ export declare function applyEventBatchToState(currentState: T, event: LoroEventBatch, options?: ((id: ContainerID) => Container | undefined) | { getContainerById?: (id: ContainerID) => Container | undefined; containerToMirrorState?: (c: Container) => MirrorState; nodeDataWithCid?: (treeId: ContainerID) => boolean; getNodeDataCid?: (treeId: ContainerID, nodeId: TreeID) => string | undefined; /** * Get the schema for a field within a container. * For maps, pass the field key. For lists, omit the key to get the item schema. */ getSchemaForKey?: (containerId: ContainerID, mapKey?: string) => SchemaType | undefined; }): T; export {}; //# sourceMappingURL=loroEventApply.d.ts.map