Task

Task.Task

Methods

disconnect

disconnect(): void

Disconnects this client. The client will stop receiving events and you will need to create a new instance if you want to use it again.

Returns

void

Example

client.disconnect()

off

off<T>(event, fn?): EmitterContract<TaskClientApiEvents>

Type parameters

NameType
Textends "task.received"

Parameters

NameType
eventT
fn?(...args: ArgumentMap<TaskClientApiEvents>[Extract<T, "task.received">]) => void

Returns

EmitterContract<TaskClientApiEvents>


on

on<T>(event, fn): EmitterContract<TaskClientApiEvents>

Type parameters

NameType
Textends "task.received"

Parameters

NameType
eventT
fn(...args: ArgumentMap<TaskClientApiEvents>[Extract<T, "task.received">]) => void

Returns

EmitterContract<TaskClientApiEvents>


once

once<T>(event, fn): EmitterContract<TaskClientApiEvents>

Type parameters

NameType
Textends "task.received"

Parameters

NameType
eventT
fn(...args: ArgumentMap<TaskClientApiEvents>[Extract<T, "task.received">]) => void

Returns

EmitterContract<TaskClientApiEvents>


removeAllListeners

removeAllListeners<T>(event?): EmitterContract<TaskClientApiEvents>

Type parameters

NameType
Textends "task.received"

Parameters

NameType
event?T

Returns

EmitterContract<TaskClientApiEvents>