UNPKG

mobx-keystone-yjs

Version:

Yjs bindings for mobx-keystone

15 lines (14 loc) 631 B
import * as Y from "yjs"; /** * Resolves a path within a Yjs object structure. * Returns the Yjs container at the specified path. * * When a Y.Text is encountered during path resolution (either at the start * or mid-path), it is returned immediately since Y.Text doesn't support * nested path traversal. * * @param yjsObject The root Yjs object * @param path Array of keys/indices to traverse * @returns The Yjs container at the path, or Y.Text if encountered during traversal */ export declare function resolveYjsPath(yjsObject: Y.Map<unknown> | Y.Array<unknown> | Y.Text, path: readonly (string | number)[]): unknown;