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: Props<TData>);
    getInitialState(): {
        currentValue: string;
        valid: boolean;
    };
    componentDidUpdate(prevProps: Props<TData>): void;
    getCurrentValueAsJson(): TData | {} | null;
    handleKeyDown(e: React.KeyboardEvent<HTMLTextAreaElement>): void;
    handleChange(e: React.ChangeEvent<HTMLTextAreaElement>): void;
    processChange(nextString: string): void;
    handleBlur(e: React.FocusEvent<HTMLTextAreaElement>): void;
    private typesafeParseOrThrow;
    render(): React.JSX.Element;
}
export default JsonEditor;
