import type { HookHub } from '@antv/xflow-hook'; import type { IArgsBase } from '../../command/interface'; import { ICommandHandler } from '../../command/interface'; import type { IHooks } from '../../hooks/interface'; import type { NsModel } from '../../common/rx-model'; import type { IModelService } from '../../model-service'; declare type ICommand = ICommandHandler; export declare namespace NsUpdateModelCommand { /** Command: 用于注册named factory */ const command: import("../../command/interface").IGraphCommand; /** hookName */ const hookKey = "updateModel"; /** hook 参数类型 */ interface IArgs extends IArgsBase { getModel: (modelService: IModelService) => Promise>; updateModel: ISetValue; } /** hook handler 返回类型 */ interface IResult { model: NsModel.IModel; /** X6的Cell */ value: T; } /** add node api service 类型 */ interface ISetValue { (value: T): Promise; } /** hooks 类型 */ interface ICmdHooks extends IHooks { updateModel: HookHub; } } export declare class UpdateModelCommand implements ICommand { /** api */ contextProvider: ICommand['contextProvider']; /** 执行Cmd */ execute: () => Promise; /** undo cmd */ undo: () => Promise; /** redo cmd */ redo: () => Promise; isUndoable(): boolean; } export declare const execCmd: () => void; export {};