Skip to content

Class: If

Generic conditional If statements. Nested else if need to be desugared into else { if ... }

Example

ts
if (condition) { ... } else { ... }

Constructors

Constructor

new If(condition, then, elseExpr, loc?): If

Parameters

ParameterType
conditionExpression
thenExpression
elseExprExpression
loc?SourceLocation

Returns

If

Overrides

ASTNode.constructor