import { MaybeRefOrGetter, ToRefs } from "vue"; import { DiscreteRoot } from "../../types.ts"; /** * Hook to subscribe to an existing discrete (JSON) CRDT document. * You can modify the returned object like any other JSON object. Changes are immediately * reflected in the CRDT document. * * Establishes a 2-way binding: Modifications to the object are immediately committed, * changes coming from the engine (or other components) cause an immediate rerender. * * In comparison to `useShape`, discrete CRDTs are untyped. * You can put any JSON data inside and need to validate the schema yourself. * * @param documentId The NURI of the CRDT document or `undefined` as MaybeRefOrGetter. * @returns An object that contains as `data` the reactive DeepSignal object or undefined if not loaded yet or `documentId` is undefined. * *@example * ```html * * * * ``` * * In the `ExpenseCard` component: * ```html * * * * ``` */ export declare function useDiscrete(documentId: MaybeRefOrGetter): ToRefs<{ doc: T; }>; //# sourceMappingURL=useDiscrete.d.ts.map