Represents a logical if/else statement. Can be used as an alternative
to the If()/Else() syntax.
The corresponding TSL select() looks like so:
The select() method is called in a chaining fashion on a condition. The parameter nodes of select()
determine the outcome of the entire statement.
Constructor
new ConditionalNode(condNode, ifNode, elseNode?)| Parameter | Type | Default Value |
|---|---|---|
| condNode | Node | — |
| ifNode | Node | — |
| elseNode? | null | Node | null |
Constructs a new conditional node.
| Accessor | Type | Modifiers |
|---|---|---|
| get type | string | static |
| Method | Type | Modifiers |
|---|---|---|
| getNodeType | (builder: NodeBuilder) => string | — |
| setup | (builder: any) => void | — |
| generate | (builder: any, output: any) => any | — |
Extends
Node| Parameter | Type | Default Value |
|---|---|---|
| condNode | Node | — |
| ifNode | Node | — |
| elseNode? | any | — |
Returns
ConditionalNode