added state modifier
This commit is contained in:
1 parent
5f486a5f89
commit
32fd7f2dff
14 files changed
+199
-182
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { AutomationNode, AutomationNodeType, NodeSubType } from "../types"
|
||||
import { BaseState } from "./BaseState"
|
||||
import ScriptCallServiceState from "./ScriptService"
|
||||
|
||||
|
||||
export const getBaseState = <T extends AutomationNodeType>(
|
||||
node_type: T,
|
||||
node_subtype: NodeSubType<T>
|
||||
) : any => {
|
||||
if ( node_type === 'action') {
|
||||
switch (node_subtype) {
|
||||
case 'Service':
|
||||
return ScriptCallServiceState
|
||||
}
|
||||
}
|
||||
throw new Error(`Invalid or Not implemented node type ${node_type} -> ${node_subtype}`)
|
||||
}
|
||||
Reference in new issue
Block a user