json-joy
Version:
Collection of libraries for building collaborative editing apps.
12 lines (11 loc) • 506 B
TypeScript
import { type JsonNode } from '../nodes';
/**
* Deeply checks if two JSON nodes have the same schema and values. Does not
* verify that the CRDT metadata (like timestamps) are the same, only that
* the structure and values are equal.
*
* @param a The first JSON CRDT node.
* @param b The second JSON CRDT node.
* @returns True if the schemas and values are equal, false otherwise.
*/
export declare const equalSchema: <A extends JsonNode<any>>(a: A, b: unknown, compareContent: boolean) => b is A;