Skip to content

Class: Otherwise

Otherwise used as the default case in GuardBody

Example

ts
f x
 | x == 2 = 16
 | otherwise = x * 8

Constructors

Constructor

new Otherwise(loc?, metadata?): Otherwise

Parameters

ParameterType
loc?SourceLocation
metadata?Metadata

Returns

Otherwise

Inherited from

ASTNode.constructor

Methods

getMetadata()

getMetadata<T>(key): T

Type Parameters

Type Parameter
T

Parameters

ParameterType
keystring

Returns

T

Inherited from

ASTNode.getMetadata


hasMetadata()

hasMetadata(key): boolean

Parameters

ParameterType
keystring

Returns

boolean

Inherited from

ASTNode.hasMetadata


setMetadata()

setMetadata(key, value): void

Parameters

ParameterType
keystring
valueany

Returns

void

Inherited from

ASTNode.setMetadata