TCommand
Notice
Command for submitting a topup request
Implements
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new TCommand(stateIndex, amount, pollId): TCommand
Create a new TCommand
Parameters
| Name | Type | Description | 
|---|---|---|
| stateIndex | bigint | the state index of the user | 
| amount | bigint | the amount of voice credits | 
| pollId | bigint | the poll ID | 
Returns
Defined in
Properties
amount
• amount: bigint
Defined in
cmdType
• cmdType: bigint
Implementation of
Defined in
pollId
• pollId: bigint
Defined in
stateIndex
• stateIndex: bigint
Defined in
Methods
copy
▸ copy<T>(): T
Create a deep clone of this TCommand
Type parameters
| Name | Type | 
|---|---|
| T | extends TCommand | 
Returns
T
a copy of the TCommand
Implementation of
Defined in
equals
▸ equals(command): boolean
Check whether this command has deep equivalence to another command
Parameters
| Name | Type | Description | 
|---|---|---|
| command | TCommand | the command to compare with | 
Returns
boolean
whether they are equal or not
Implementation of
Defined in
toJSON
▸ toJSON(): IJsonTCommand
Serialize into a JSON object
Returns
Implementation of
Defined in
fromJSON
▸ fromJSON(json): TCommand
Deserialize into a TCommand object
Parameters
| Name | Type | Description | 
|---|---|---|
| json | IJsonTCommand | the json representation | 
Returns
the TCommand instance