import type { Root } from "../../core/Root"; import { Entity } from "../../core/util/Entity"; import { Container } from "../../core/render/Container"; export declare class MissingRefError extends Error { refName: string; constructor(refName: string); } export interface IParseSettings { /** * Container to add the parsed chart to, usually `root.container`. The * config must then build a [[Sprite]]. */ parent?: Container; /** * What a config block with a `type` does to an object that is already * there: `"strict"` replaces it with a new object of that type; `"soft"` * replaces it only if its type differs, and otherwise applies the block to * it, as if the block had no `type`. * * @default "strict" * @since 5.20.3 */ updateTargets?: "strict" | "soft"; } /** * Builds charts from JSON configs. * * @see {@link https://www.amcharts.com/docs/v5/concepts/serializing/} for more info * @since 5.3.0 */ export declare class JsonParser { protected _root: Root; /** * IMPORTANT! Do not instantiate this class via `new Class()` syntax. * * Use static method `Class.new()` instead. * * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info * @ignore */ constructor(root: Root, isReal: boolean); /** * Use this method to create an instance of this class. * * @see {@link https://www.amcharts.com/docs/v5/getting-started/#New_element_syntax} for more info * @param root Root element * @return Instantiated object */ static new>(this: C, root: Root): T; /** * Builds the chart objects a config describes, loading the classes it * needs first. * * @param object Config, as a plain object * @param settings Parse settings * @return A promise of the object the config builds, usually the chart */ parse(object: unknown, settings?: IParseSettings): Promise; /** * Builds the chart objects a config describes, from a JSON string. * * @param string JSON string * @param settings Parse settings * @return A promise of the object the config builds, usually the chart */ parseString(string: string, settings?: IParseSettings): Promise; } /** * Registers a class so that it can be parsed and instantiated by JSON parser. * * @param name Class name * @param ref Class reference * @ignore */ export declare function registerCustomClass(name: string, ref: any): void; //# sourceMappingURL=Json.d.ts.map