import { EditorState, PluginKey, Transaction } from "prosemirror-state"; /** * Helper to provide statically typed wrappers over ProseMirror APIs. * * Public APIs are bound so can be safely used directly, e.g. * * interface PluginState { * myPluginField: string; * } * const { key, getPluginState } = new PluginDescriptor('MyPlugin'); */ export declare class PluginDescriptor { private readonly name; readonly key: PluginKey; constructor(name: string); setPluginState: (env: { state: EditorState>; tr?: Transaction> | undefined; dispatch?: ((tr: Transaction>) => void) | undefined; }, newPluginState: PluginState | ((prevPluginState: PluginState) => PluginState)) => void; getPluginState: (source: EditorState | Transaction>) => PluginState | null; getPluginStateOrThrow: (source: EditorState | Transaction>) => PluginState; }