AutoBE
    Preparing search index...

    Prefix unary expression for operators applied before operands.

    Represents unary operators that appear before their operands:

    • "!" for logical negation
    • "++" for pre-increment
    • "--" for pre-decrement

    ⚠️ IMPORTANT: For typeof operator, use AutoBeTest.ITypeOfExpression instead! ⚠️

    If you're trying to create a typeof X expression, DO NOT use this interface with operator: "typeof". Use the dedicated AutoBeTest.ITypeOfExpression interface instead, which is specifically designed for typeof operations.

    ❌ WRONG:

    {
    type: "prefixUnaryExpression",
    operator: "typeof", // ❌ This is incorrect!
    operand: someExpression
    }

    ✅ CORRECT:

    {
    type: "typeOfExpression", // ✅ Use this for typeof!
    expression: someExpression
    }

    E2E testing usage:

    • Logical negation for condition inversion in business logic
    • Increment/decrement for counter operations (rare in typical test scenarios)

    AI function calling context: Use for simple unary operations needed in business logic conditions or calculations involving captured test data.

    interface IPrefixUnaryExpression {
        operand: IExpression;
        operator: "!" | "++" | "--" | "-" | "+";
        type: "prefixUnaryExpression";
    }
    Index

    Properties

    Properties

    operand: IExpression

    The operand expression to which the operator is applied.

    For "!": typically boolean expressions or conditions involving captured data For "++/--": typically variable identifiers that need modification

    Should reference captured data or computed values, not direct API calls.

    operator: "!" | "++" | "--" | "-" | "+"

    The unary operator to apply.

    • "!": Logical NOT (most common in test conditions)
    • "++": Pre-increment (modify then use value)
    • "--": Pre-decrement (modify then use value)
    type: "prefixUnaryExpression"

    Type discriminator.