import { JSONConfiguration, JSONConfigurationProps } from "./json-configuration.js"; /** * Properties accepted by `JSONConverter`. */ export type JSONConverterProps = { /** Configuration catalogs and hooks used during conversion. */ configuration: JSONConfiguration | JSONConfigurationProps; /** Optional callback fired when JSON input changes. */ onJSONChange: () => void; }; /** * Converts JSON to "props" by "hydrating" classes, resolving enums and functions etc. * * Lightly processes `json` props, transform string values, and extract `views` and `layers` * @see https://github.com/visgl/deck.gl/blob/master/dev-docs/RFCs/v6.1/json-layers-rfc.md * * NOTES: * - This is intended to provide minimal necessary processing required to support * existing deck.gl props via JSON. This is not an implementation of alternate JSON schemas. * - Optionally, error checking could be applied, but ideally should leverage * non-JSON specific mechanisms like prop types. */ export declare class JSONConverter { /** Logger used by downstream helpers for warnings. */ log: Console; /** Active configuration used by the converter. */ configuration: JSONConfiguration; /** Callback invoked when the configured JSON input changes. */ onJSONChange: () => void; /** Most recently converted JSON input. */ json: unknown; /** Cached result for the most recently converted JSON input. */ convertedJson: unknown; /** * Creates a converter for a configuration object or `JSONConfiguration` instance. * @param props Converter properties. */ constructor(props: any); /** Releases resources held by the converter. Present for API symmetry. */ finalize(): void; /** * Updates the active configuration and callbacks. * @param props Converter properties or an already-created configuration instance. */ setProps(props: JSONConverterProps | JSONConfiguration): void; /** * Merges additional configuration into the current converter. * @param config Additional catalogs or hooks to merge. */ mergeConfiguration(config: JSONConfiguration | JSONConfigurationProps): void; /** * Converts a JSON object or JSON string into runtime props. * @param json JSON payload to convert. * @returns The converted runtime value. */ convert(json: unknown): unknown; /** * Backwards-compatible alias for `convert()`. * @param json JSON payload to convert. * @returns The converted runtime value. */ convertJson(json: any): unknown; } //# sourceMappingURL=json-converter.d.ts.map