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
| Parameter | Type |
|---|---|
identifier | SymbolPrimitive |
equations | Equation[] |
loc? | SourceLocation |
Returns
Method
Overrides
ASTNode.constructor
Methods
getMetadata()
getMetadata<
T>(key):T
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
T
Inherited from
ASTNode.getMetadata
hasMetadata()
hasMetadata(
key):boolean
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
Inherited from
ASTNode.hasMetadata
setMetadata()
setMetadata(
key,value):void
Parameters
| Parameter | Type |
|---|---|
key | string |
value | any |
Returns
void
Inherited from
ASTNode.setMetadata