import type { JSONDocNode } from '@atlaskit/editor-json-transformer';
import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
import { type FireAnalyticsCallback } from '../../analytics';
import type { DefaultTransformerResultCallback, InferTransformerResultCallback, Transformer } from '../../types';
export declare function toJSON(node: PMNode): JSONDocNode;
/**
 * This throttles the callback with requestIdleCallback.
 */
export declare function createThrottleSchedule<GenericTransformer extends Transformer<any> = Transformer<JSONDocNode>>(callback: typeof returnDocumentRequest<GenericTransformer>): (editorView: EditorView | null, callback: GenericTransformer extends undefined ? DefaultTransformerResultCallback : InferTransformerResultCallback<GenericTransformer>, transformer?: GenericTransformer | undefined, fireAnalyticsEvent?: FireAnalyticsCallback | undefined, _alwaysFire?: boolean | undefined) => void;
export declare function returnDocumentRequest<GenericTransformer extends Transformer<any> | undefined>(editorView: EditorView | null, callback: GenericTransformer extends undefined ? DefaultTransformerResultCallback : InferTransformerResultCallback<GenericTransformer>, transformer?: GenericTransformer, fireAnalyticsEvent?: FireAnalyticsCallback, _alwaysFire?: boolean): undefined;
export declare function returnDocumentRequestNoThrowError<GenericTransformer extends Transformer<any> | undefined>(editorView: EditorView | null, callback: GenericTransformer extends undefined ? DefaultTransformerResultCallback : InferTransformerResultCallback<GenericTransformer>, transformer?: GenericTransformer, fireAnalyticsEvent?: FireAnalyticsCallback, _alwaysFire?: boolean): undefined;
