Skip to main content

abstractCommandEvent <T>

The superclass of the events marking one command a driver runs, such as one octo CLI command. A command may run several modes, or none.

@group

Events/Command

Hierarchy

Index

Constructors

Properties

Constructors

constructor

  • CommandEvent<T>(name?: string, payload?: T): CommandEvent<T>
  • Type parameters

    • T: { command: string } = { command: string }

    Parameters

    • optionalname: string

      The subject of the event, when the event type alone does not identify it.

    • optionalpayload: T

      The event's data.

    Returns CommandEvent<T>

Properties

readonlyinheritedheader

header: { sequence: number; timestamp: number }

When the event was created. sequence counts every event this process created, so it orders two events created in the same millisecond, and events a late listener receives replayed.


Type declaration

  • sequence: number
  • timestamp: number

readonlyinheritedname

name: string

The subject of the event, when the event type alone does not identify it - e.g. the class name on a registration event. Empty otherwise.

readonlyinheritedpayload

payload: T

The event's data. Its shape is fixed by the event type.

Page Options