@alilc/lowcode-editor-core
Version:
Core Api for Ali lowCode engine
20 lines (19 loc) • 914 B
TypeScript
import { IPublicApiCommand, IPublicModelPluginContext, IPublicTypeCommand, IPublicTypeCommandHandlerArgs, IPublicTypeListCommand } from '@alilc/lowcode-types';
export interface ICommand extends Command {
}
export interface ICommandOptions {
commandScope?: string;
}
export declare class Command implements Omit<IPublicApiCommand, 'registerCommand' | 'batchExecuteCommand'> {
private commands;
private commandErrors;
registerCommand(command: IPublicTypeCommand, options?: ICommandOptions): void;
unregisterCommand(name: string): void;
executeCommand(name: string, args: IPublicTypeCommandHandlerArgs): void;
batchExecuteCommand(commands: {
name: string;
args: IPublicTypeCommandHandlerArgs;
}[], pluginContext: IPublicModelPluginContext): void;
listCommands(): IPublicTypeListCommand[];
onCommandError(callback: (name: string, error: Error) => void): void;
}