2.1.1 • Published 9 months ago
ah-flow-node v2.1.1
ah-flow-node
引入说明
import { FlowDTRegistry, FlowNodeTypeRegistry } from 'ah-flow-node';
// 注册 IO 类型
declare module 'ah-flow-node' {
interface IFlowDTMap {
SmartString: any
}
}
FlowDTRegistry.Default.register('SmartString', {});
// 注册 FlowNode
declare module 'ah-flow-node' {
interface IFlowNodeMetaMap {
HelloWorld: IFlowNodeMeta<'HelloWorld', { nick: 'String' }, { text: 'SmartString' }>;
}
}
FlowNodeTypeRegistry.Default.register('HelloWorld', {});
// 创建节点
const node = FlowNodeTypeRegistry.Default.factory('HelloWorld')();
2.1.1
9 months ago