MCPcopy Create free account
hub / github.com/Project-DARC/DARC / generateExpressionConditionNodeStruct

Method generateExpressionConditionNodeStruct

darc-js/src/SDK/Node.ts:34–47  ·  view source on GitHub ↗

* Just generate a condition node struct for the expression node * @param id The id of the condition node * @returns The condition node struct

(id: bigint)

Source from the content-addressed store, hash-verified

32 * @returns The condition node struct
33 */
34 private generateExpressionConditionNodeStruct(id: bigint): ConditionNodeStruct {
35 if (this.type !== "EXPRESSION") {
36 throw new Error("Node type is not EXPRESSION");
37 }
38 const conditionNodeStruct: ConditionNodeStruct = {
39 id: id,
40 nodeType: 1,
41 logicalOperator:0,
42 conditionExpression: this.expressionId,
43 childList: [],
44 param: this.nodeParam,
45 };
46 return conditionNodeStruct;
47 }
48
49 /**
50 * Generate a condition node struct for BOOLEAN_TRUE or BOOLEAN_FALSE

Calls

no outgoing calls

Tested by

no test coverage detected