Skip to main content
Version: v1.2

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

NameTypeDescription
stateIndexbigintthe state index of the user
amountbigintthe amount of voice credits
pollIdbigintthe poll ID

Returns

TCommand

Defined in

commands/TCommand.ts:21

Properties

amount

amount: bigint

Defined in

commands/TCommand.ts:11


cmdType

cmdType: bigint

Implementation of

ICommand.cmdType

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

NameType
Textends TCommand

Returns

T

a copy of the TCommand

Implementation of

ICommand.copy

Defined in

commands/TCommand.ts:32


equals

equals(command): boolean

Check whether this command has deep equivalence to another command

Parameters

NameTypeDescription
commandTCommandthe command to compare with

Returns

boolean

whether they are equal or not

Implementation of

ICommand.equals

Defined in

commands/TCommand.ts:39


toJSON

toJSON(): IJsonTCommand

Serialize into a JSON object

Returns

IJsonTCommand

Implementation of

ICommand.toJSON

Defined in

commands/TCommand.ts:48


fromJSON

fromJSON(json): TCommand

Deserialize into a TCommand object

Parameters

NameTypeDescription
jsonIJsonTCommandthe json representation

Returns

TCommand

the TCommand instance

Defined in

commands/TCommand.ts:62