Skip to content

Class: Catch

Represents a catch block for handling exceptions thrown in a try block.

Constructors

Constructor

new Catch(patterns, body, loc?): Catch

Parameters

ParameterType
patternsPattern[]
bodyExpression
loc?SourceLocation

Returns

Catch

Overrides

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