Policy<C, E>: WithDescription & {
    on: {
        [K in keyof E]: ((event) => Promise<Message<C> | undefined> | undefined)
    };
    schemas: PolicySchemas<C, E>;
}

Policies handle events and can invoke local commands synchronously

  • schemas for message validation and documentation
  • on event handlers

Type Parameters

Type declaration

  • on: {
        [K in keyof E]: ((event) => Promise<Message<C> | undefined> | undefined)
    }
  • schemas: PolicySchemas<C, E>

Generated using TypeDoc