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
commands/TCommand.ts:21
Properties
amount
• amount: bigint
Defined in
commands/TCommand.ts:11
cmdType
• cmdType: bigint
Implementation of
Defined in
commands/TCommand.ts:7
pollId
• pollId: bigint
Defined in
commands/TCommand.ts:13
stateIndex
• stateIndex: bigint
Defined in
commands/TCommand.ts:9
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
commands/TCommand.ts:32
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
commands/TCommand.ts:39
toJSON
▸ toJSON(): IJsonTCommand
Serialize into a JSON object
Returns
Implementation of
Defined in
commands/TCommand.ts:48
fromJSON
▸ fromJSON(json
): TCommand
Deserialize into a TCommand object
Parameters
Name | Type | Description |
---|---|---|
json | IJsonTCommand | the json representation |
Returns
the TCommand instance
Defined in
commands/TCommand.ts:62