import type { Ctx, MilkdownPlugin, SliceType } from '@milkdown/ctx'; import type { Command } from '@milkdown/prose/state'; export type Cmd = (payload?: T) => Command; export type CmdKey = SliceType>; type InferParams = T extends CmdKey ? U : never; export declare class CommandManager { #private; setCtx: (ctx: Ctx) => void; get ctx(): Ctx | null; create(meta: CmdKey, value: Cmd): import("@milkdown/ctx").Slice, string>; get>(slice: string): Cmd>; get(slice: CmdKey): Cmd; get(slice: string | CmdKey): Cmd; remove>(slice: string): void; remove(slice: CmdKey): void; remove(slice: string | CmdKey): void; call>(slice: string, payload?: InferParams): boolean; call(slice: CmdKey, payload?: T): boolean; call(slice: string | CmdKey, payload?: any): boolean; } export declare function createCmdKey(key?: string): CmdKey; export declare const commandsCtx: SliceType; export declare const commandsTimerCtx: SliceType; export declare const CommandsReady: import("@milkdown/ctx").TimerType; export declare const commands: MilkdownPlugin; export {}; //# sourceMappingURL=commands.d.ts.map