import * as React from "react";
import type { Result } from "@khanacademy/perseus-core";
type Props<TData> = {
    multiLine: boolean;
    value: TData;
    onChange: (newJson: TData) => void;
    parser: (json: string) => Result<TData, unknown>;
    editingDisabled: boolean;
};
type State = {
    currentValue: string | undefined;
    valid: boolean | undefined;
};
declare class JsonEditor<TData> extends React.Component<Props<TData>, State> {
    static displayName: "JsonEditor";
    constructor(props: any);
    getInitialState(): {
        currentValue: string;
        valid: boolean;
    };
    componentDidUpdate(prevProps: Props<TData>): void;
    getCurrentValueAsJson(): TData | {} | null;
    handleKeyDown(e: any): void;
    handleChange(e: any): void;
    handleBlur(e: any): void;
    private typesafeParseOrThrow;
    render(): React.JSX.Element;
}
export default JsonEditor;
