A component is any part of the system that has a own identity and can be monitored for error handling. The only requirement is to emit an error event when something goes wrong, to have a name and unique component identifier.

interface Component {
    componentId: string;
    name: string;
    on(event: "error", listener: (error: Multi | Error | Crash) => void): this;
}

Hierarchy (View Summary)

Implemented by

Properties

Methods

Properties

componentId: string

Component identifier

name: string

Component name

Methods

  • Add a listener for the error event, emitted when the component detects an error.

    Parameters

    • event: "error"

      error event

    • listener: (error: Multi | Error | Crash) => void

      Error event listener

    Returns this