update node definition

This commit is contained in:
codetypes committed 2024-08-13 09:59:26 +08:00
1 parent ba1145cb9f
commit d7a2ce0f9b
1 file changed
+9 -7
+9 -7
View File
@@ -2,32 +2,34 @@ import { TreeGraphData as G6TreeGraphData } from "@antv/g6";
export type NodeType = "Action" | "Composite" | "Decorator" | "Condition" | "Other" | "Error"; export type NodeType = "Action" | "Composite" | "Decorator" | "Condition" | "Other" | "Error";
export interface NodeArgOption {
name: string;
value: string | number;
}
export interface NodeArg { export interface NodeArg {
name: string; name: string;
type: type:
| "boolean" | "boolean"
| "boolean?" | "boolean?"
| "boolean[]"
| "int" | "int"
| "int?" | "int?"
| "int[]"
| "float" | "float"
| "float?" | "float?"
| "float[]"
| "string" | "string"
| "string?" | "string?"
| "string[]"
| "json" | "json"
| "json?" | "json?"
| "json[]"
| "enum" | "enum"
| "enum?" | "enum?"
| "enum[]"
| "code" | "code"
| "code?"; | "code?"
| "code[]";
desc: string; desc: string;
oneof?: string; oneof?: string;
default?: unknown; default?: unknown;
options?: NodeArgOption[]; options?: { name: string; value: string | number }[];
} }
export interface NodeDef { export interface NodeDef {