site/node_modules/mj-context-menu/js/item_command.d.ts

17 lines
556 B
TypeScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import { AbstractItem } from './abstract_item.js';
import { Menu } from './menu.js';
import { ParserFactory } from './parser_factory.js';
export declare class Command extends AbstractItem {
private command;
static fromJson(_factory: ParserFactory, { content: content, action: action, id: id }: {
content: string;
action: Function;
id: string;
}, menu: Menu): Command;
constructor(menu: Menu, content: string, command: Function, id?: string);
executeAction(): void;
toJson(): {
type: string;
};
}