Skip to content

Class: Method

Represents a method definition within a class or object.

Example

ts
method exhaust() {
   energy -= 5
}

Constructors

Constructor

new Method(identifier, equations, loc?): Method

Parameters

ParameterType
identifierSymbolPrimitive
equationsEquation[]
loc?SourceLocation

Returns

Method

Overrides

ASTNode.constructor