/** * Canonical serialization helpers shared by everything that needs stable, * environment-independent output — contract hashing (contract.ts) and * semantic cache keys (cache/query-signature.ts). Keep ordering logic here so * the two paths cannot drift apart. */ /** * Locale-independent string comparison by UTF-16 code unit. Used everywhere * canonical output sorts, so hashes and cache keys are stable across * environments (CI ICU versions, locales) rather than depending on * `localeCompare`. */ export declare function compareStrings(left: string, right: string): number; /** Builds an object whose keys are inserted in sorted order for stable JSON. */ export declare function sortedRecord(entries: [string, T][]): Record; /** Deduplicates and sorts a list so logically-equal sets serialize identically. */ export declare function uniqueSorted(values: readonly string[]): string[]; /** JSON.stringify with recursively sorted object keys, so key order never matters. */ export declare function stableStringify(value: unknown): string; //# sourceMappingURL=canonical-json.d.ts.map