Description
Enum used by IExpression.type to describe each parsed node.
API Reference
ExpressionType describes the node kind for an IExpression via expression.type.
Enum used by IExpression.type to describe each parsed node.
No runtime parameters.
Members resolve to string enum values used for runtime node classification.
| Addition | Adds numbers or concatenates strings depending on operand types. | a + b |
| And | Evaluates left to right and returns the first falsy operand, otherwise the last operand. | isReady && isValid |
| Array | Array literal node. | [a, b, c] |
| BigInt | BigInt literal node. | 10n |
| BitwiseAnd | Performs bitwise AND between corresponding bits of both operands. | a & b |
| BitwiseLeftShift | Shifts bits of the left operand left by the number of bits from the right operand. | value << 1 |
| BitwiseNot | Inverts all bits of the operand. | ~value |
| BitwiseOr | Performs bitwise OR between corresponding bits of both operands. | a | b |
| BitwiseRightShift | Shifts bits of the left operand right (sign-preserving) by the right operand. | value >> 1 |
| BitwiseUnsignedRightShift | Shifts bits of the left operand right with zero-fill by the right operand. | value >>> 1 |
| BitwiseXor | Performs bitwise XOR between corresponding bits of both operands. | a ^ b |
| Boolean | Boolean literal node. | true |
| Conditional | Evaluates a condition and returns either the consequent or alternate branch. | a > 0 ? a : 0 |
| Division | Divides the left numeric operand by the right numeric operand. | a / b |
| Equality | Compares values with JavaScript loose equality semantics (type coercion allowed). | a == b |
| Exponentiation | Raises the left operand to the power of the right operand. | a ** 2 |
| Function | Represents a function call expression and evaluates by invoking the resolved function with arguments. | sum(a, b) |
| GreaterThan | Returns true when the left operand is greater than the right operand. | a > b |
| GreaterThanOrEqual | Returns true when the left operand is greater than or equal to the right operand. | a >= b |
| Identifier | Variable or model field access. | a |
| In | Checks whether a property key exists in an object or its prototype chain. | 'key' in obj |
| Index | Indexed access node. | items[0] |
| Inequality | Compares values with JavaScript loose inequality semantics (type coercion allowed). | a != b |
| Instanceof | Checks whether an object is an instance of a constructor via prototype-chain lookup. | value instanceof Date |
| LessThan | Returns true when the left operand is less than the right operand. | a < b |
| LessThanOrEqual | Returns true when the left operand is less than or equal to the right operand. | a <= b |
| Member | Object member access. | user.name |
| Multiplication | Multiplies two numeric operands and returns the product. | a * b |
| New | Constructs a new object instance by invoking a constructor with arguments. | new Date() |
| Not | Converts the operand to boolean and returns the negated value. | !isEnabled |
| Null | Null literal node. | null |
| NullishCoalescing | Returns the right operand only when the left operand is null or undefined. | name ?? 'N/A' |
| Number | Number literal node. | 42 |
| Object | Object literal node. In expression strings, wrap object literals in parentheses so they are parsed as an expression, not a block. | ({ total: a + b }) |
| Or | Evaluates left to right and returns the first truthy operand, otherwise the last operand. | left || right |
| RegExp | Regular expression literal node. | /abc/i |
| Remainder | Returns the remainder after dividing the left operand by the right operand. | count % 2 |
| Sequence | Comma operator sequence. It evaluates multiple expressions left-to-right and returns only the last result. Use it when you need side effects first, then a final value. | (a++, a) |
| Spread | Spread element/property. Valid inside array literals, object literals, and function calls. It expands iterable elements or object properties into the surrounding expression. | ({ ...defaults, enabled: true }) |
| StrictEquality | Compares values without type coercion; both type and value must match. | a === b |
| StrictInequality | Compares values without type coercion and returns true when type or value differs. | a !== b |
| String | String literal node. | 'hello' |
| Subtraction | Subtracts the right numeric operand from the left numeric operand. | a - b |
| TemplateLiteral | Template string node. | `Hello ${name}` |
| Typeof | Returns the JavaScript runtime type name of the operand as a string. | typeof value === 'string' |
| UnaryNegation | Converts operand to number and returns its arithmetic negation. | -amount |
| UnaryPlus | Converts the operand to a number without changing its sign. | +value |