UNPKG

json-joy

Version:

Collection of libraries for building collaborative editing apps.

12 lines (11 loc) 507 B
import { type JsonNode } from '../nodes'; import type { JsonNodeToSchema } from './types'; /** * Converts any JSON CRDT node to a schema representation. The schema can be * used to copy the structure of the JSON CRDT node to another document or * another location in the same document. * * @param node JSON CRDT node to recursively convert to schema. * @returns Schema representation of the JSON CRDT node. */ export declare const toSchema: <N extends JsonNode<any>>(node: N) => JsonNodeToSchema<N>;