import type * as Y from "yjs";
import { Primitive } from "../../plainTypes/types";
import { YjsValue } from "../yjsTypes/types";
/**
 * Converts a plain value to a Y.js value.
 * Objects are converted to Y.Maps, arrays to Y.Arrays, primitives are untouched.
 */
export declare function convertPlainToYjsValue<T extends Primitive>(v: T): T;
export declare function convertPlainToYjsValue(v: readonly any[]): Y.Array<YjsValue>;
export declare function convertPlainToYjsValue(v: Readonly<Record<string, any>>): Y.Map<YjsValue>;
/**
 * Applies a plain array to a Y.Array, using the convertPlainToYjsValue to convert the values.
 *
 * @param dest - The Y.js Array that will receive the converted values.
 * @param source - The plain JavaScript array whose values will be converted and pushed to the destination.
 */
export declare const applyPlainArrayToYArray: (dest: Y.Array<any>, source: readonly any[]) => void;
/**
 * Applies a plain object to a Y.Map, using the convertPlainToYjsValue to convert the values.
 *
 * @param dest - The destination Y.Map where the properties will be set
 * @param source - The plain JavaScript object whose properties will be applied to the Y.Map
 */
export declare const applyPlainObjectToYMap: (dest: Y.Map<any>, source: Readonly<Record<string, any>>) => void;
