Type Alias: ExpressionDto
@kortexya/reasoninglayer / ExpressionDto
Type Alias: ExpressionDto
Section titled “Type Alias: ExpressionDto”ExpressionDto = {
name:string;type:"Variable"; } | {type:"Literal";value:FunctionValueDto; } | {left:ExpressionDto;op:BinaryOperatorDto;right:ExpressionDto;type:"BinaryOp"; } | {arguments:ExpressionDto[];functionName:string;type:"FunctionCall"; } | {op:UnaryOperatorDto;operand:ExpressionDto;type:"UnaryOp"; } | {branches:ConditionalBranchDto[];default?:ExpressionDto|null;type:"Conditional"; }
Defined in: src/types/functions.ts:68
Arithmetic/logical expression used in function bodies and guards.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ name: string; type: "Variable"; }
Type Literal
Section titled “Type Literal”{ type: "Literal"; value: FunctionValueDto; }
Type Literal
Section titled “Type Literal”{ left: ExpressionDto; op: BinaryOperatorDto; right: ExpressionDto; type: "BinaryOp"; }
Type Literal
Section titled “Type Literal”{ arguments: ExpressionDto[]; functionName: string; type: "FunctionCall"; }
Type Literal
Section titled “Type Literal”{ op: UnaryOperatorDto; operand: ExpressionDto; type: "UnaryOp"; }
Type Literal
Section titled “Type Literal”{ branches: ConditionalBranchDto[]; default?: ExpressionDto | null; type: "Conditional"; }
branches
Section titled “branches”branches:
ConditionalBranchDto[]
Branches, tried in order; the first whose when holds supplies the value.
default?
Section titled “default?”
optionaldefault?:ExpressionDto|null
The value when no branch holds. null when the conditional has none.
type:
"Conditional"
Remarks
Section titled “Remarks”A recursive tagged union. BinaryOp contains nested ExpressionDto children.
FunctionCall allows calling other user-defined functions within an expression.