@fgaudo/effect-tea - v0.7.2
    Preparing search index...

    Interface RunOptions<Message, State, Command>

    How a program runs: how messages and commands appear in the logs, and who observes the transitions.

    interface RunOptions<Message, State = unknown, Command = unknown> {
        describeCommand?: (command: Command) => unknown;
        describeMessage?: (message: Message) => unknown;
        onApplied?: (applied: Applied<State, Message, Command>) => Effect<void>;
        onIgnored?: (ignored: Ignored<State, Message>) => Effect<void>;
    }

    Type Parameters

    • Message
    • State = unknown
    • Command = unknown
    Index
    describeCommand?: (command: Command) => unknown

    How a command appears in the logs; by default its _tag, never its data. Called only while debug logs are enabled.

    describeMessage?: (message: Message) => unknown

    How a message appears in the logs; by default its _tag, never its data. Called only while debug logs are enabled.

    onApplied?: (applied: Applied<State, Message, Command>) => Effect<void>

    Hears every message update accepts, in order, with the state before and after it and the commands it started (e.g. for devtools, or to record a session), before its frame is drawn and its commands start. The program waits for it, so it should be quick; a defect in it ends the run like any other.

    onIgnored?: (ignored: Ignored<State, Message>) => Effect<void>

    Hears every message update rejects, which the run ignores, with where it came from and the state it did not apply in (e.g. for devtools, or to count the taps that did nothing). It only watches: the message stays ignored, and the state as it was. The program waits for it, so it should be quick; a defect in it ends the run like any other.