@lou.codes/test
Version:
✅ Equality test with enforced readability
23 lines (22 loc) • 600 B
TypeScript
import type { Difference } from "./Difference.js";
/**
* Takes a `Difference` object and returns a string using `stringifyDifferenceDictionary`.
*
* @category Output
* @example
* ```typescript
* stringifyDifference({
* kind: "DELETE",
* left: "🟢",
* path: ["🟢", "🟩"],
* }); // "🟢.🟩 is missing."
*
* stringifyDifference({
* kind: 8,
* error: "❌",
* }); // "there was an uncaught error: ❌."
* ```
* @param difference Difference object.
* @returns Formatted string.
*/
export declare const stringifyDifference: ({ kind, ...difference }: Difference) => string;