/** * Safely stringifies any JavaScript value, handling special cases like: * - Error objects * - BigInt * - Functions * - Symbols * - Special number values (NaN, Infinity) * - Built-in objects (Date, RegExp) * - Collections (Map, Set) * - TypedArrays and ArrayBuffers * * @param arg - The value to stringify * @returns A string representation of the value * * @example * ```typescript * // Handle Error objects * safeStringify(new Error("test")); // '{"name":"Error","message":"test","stack":"..."}' * * // Handle special types * safeStringify(BigInt(123)); // "123n" * safeStringify(Symbol("test")); // "Symbol(test)" * safeStringify(() => {}); // "[Function: anonymous]" * safeStringify(new Map([["key", "value"]])); // '{"__type":"Map","value":[["key","value"]]}' * ``` */ export declare function safeStringify(arg: unknown): string; //# sourceMappingURL=safeStringify.d.ts.map