Events

View as Markdown

Events

task.received

  • task.received(payload)

Emitted whenever a task is received. Your event handler receives the payload. Example:

1const client = new Task.Client(...)
2client.on('task.received', (payload) => {
3 console.log('Task Received', payload)
4 // Do something with the payload...
5})

Parameters

NameTypeDescription
payloadRecord<string, unknown>The message payload.