• An expression that implements if-then-else logic.

    Type Parameters

    • T extends string | number | Vector3

    Parameters

    • ifExpression: Expression<boolean>

      The expression that should decide which of the other expressions to take. Should result in a boolean.

    • thenExpression: Expression<T>

      The expression whose result will be returned if the ifExpression results in true.

    • elseExpression: Expression<T>

      The expression whose result will be returned if the ifExpression results in false. Should result in the same type of value as the thenExpression.

    Returns Expression<T>

    An expression that return the result of one of the other expressions, based on the ifExpression.