Implemented by components that have a lifecycle

interface Startable {
    afterStart?(): void | Promise<void>;
    afterStop?(): void | Promise<void>;
    beforeStart?(): void | Promise<void>;
    beforeStop?(): void | Promise<void>;
    start(): void | Promise<void>;
    stop(): void | Promise<void>;
}

Hierarchy (view full)

Methods

  • If implemented, this method will be invoked after the start method.

    All other components will have had their start method invoked before this method is called.

    Returns void | Promise<void>

  • If implemented, this method will be invoked after the stop method.

    All other components will have had their stop method invoked before this method is called.

    Returns void | Promise<void>