pamoja for TypeScript - v0.2.0
    Preparing search index...

    Interface EngineRunOptions

    How a rule engine runs until it is told to stop.

    interface EngineRunOptions {
        messages?: number;
        onError?: (error: unknown) => unknown;
        onFired?: (fired: profile.RuleFired[]) => unknown;
        pollMs?: number;
        signal?: AbortSignal;
    }
    Index
    messages?: number

    How many messages to handle before returning; the loop runs until stopped unless given.

    onError?: (error: unknown) => unknown

    Hears a message that could not be judged or an action that failed. The loop carries on with the next message; without one, the failure ends the loop and run rejects with it.

    onFired?: (fired: profile.RuleFired[]) => unknown

    Hears each message that set or cleared a rule, with what fired.

    pollMs?: number

    How long each wait for a message lasts before the signal is checked again.

    signal?: AbortSignal

    Stops the loop; a message under way is finished first.