/** * Provides deterministic JSON stringification for pattern matching in policy rules. * Ensures consistent ordering of object keys and handling of special values. */ type JSONValue = string | number | boolean | null | JSONValue[] | { [key: string]: JSONValue; }; /** * Deterministically stringifies a value for use in pattern matching. * - Object keys are sorted alphabetically * - Arrays maintain their order * - undefined values are omitted * - Functions and symbols are converted to null * - Circular references throw an error * * @param value - The value to stringify * @param space - Optional spacing for readability (default: none) * @returns Deterministic JSON string */ export declare function stableStringify(value: unknown, space?: string | number): string; /** * Parses a stable-stringified JSON string back into a value. * This is just a wrapper around JSON.parse for consistency. * * @param text - The JSON string to parse * @returns Parsed value */ export declare function stableParse(text: string): JSONValue; export {};