aimpress-chatbot/node_modules/botbuilder-stdlib/lib/stringify.d.ts
“SamoilenkoVadym” 55445dbc86
Some checks failed
Build and deploy Node.js app to Azure Web App - ChatBot2222 / build (push) Has been cancelled
Build and deploy Node.js app to Azure Web App - ChatBot2222 / deploy (push) Has been cancelled
Deploy bot to Azure
2025-04-27 19:55:19 +01:00

30 lines
No EOL
1.3 KiB
TypeScript

/**
* Encapsulates JSON.stringify function to detect and handle different types of errors (eg. Circular Structure).
*
* @remarks
* Circular Structure:
* - It detects when the provided value has circular references and replaces them with [Circular *.{path to the value being referenced}].
*
* _replacer internal function:
* - Have similar functionality as the JSON.stringify internal toJSON function, but with the difference that only affects this stringify functionality.
*
* @example
* // Circular Structure:
* {
* "item": {
* "name": "parent",
* "parent": null,
* "child": {
* "name": "child",
* "parent": "[Circular *.item]" // => obj.item.child.parent = obj.item
* }
* }
* }
*
* @param value — A JavaScript value, usually an object or array, to be converted.
* @param replacer — A function that transforms the results.
* @param space — Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
* @returns {string} The converted JavaScript value to a JavaScript Object Notation (JSON) string.
*/
export declare function stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
//# sourceMappingURL=stringify.d.ts.map