effect-tea-persistent
    Preparing search index...
    • Checks program.project(state) against update in state, both ways, as effect-tea's dispatchViolations checks a view. The candidates are the messages a test asks about, each with its sender: the messages of an order, sent by its customer and by the warehouse. Each is sent as a caller at at. A candidate the projection allows to its sender must be accepted, and one it does not allow must be rejected. Candidates of a kind allows leaves out are skipped. A retry is answered from the stored reply, so nothing here checks that a message acts once. allows is given the projection as a caller reads it, decoded from its JSON, where -0 is 0. A projection that does not encode throws the defect the runtime suspends the entity on, since no caller reads it. update is given state and each candidate as the test gives them (decision 0276). Returns every violation, so that a test can assert there are none, for generated states.

      Type Parameters

      • T extends Readonly<
            {
                flags: unknown;
                inbound: unknown;
                index: string;
                internal: unknown;
                key: string;
                operation: Readonly<{ _tag: string }>;
                parameter: object;
                projection: unknown;
                rejection: unknown;
                sender: unknown;
                services: unknown;
                state: object;
                topics?: Readonly<Record<string, Json>>;
            },
        >

      Parameters

      Returns (
          state: T["state"],
          candidates: Iterable<
              Readonly<{ message: T["inbound"]; sender: T["sender"] }>,
          >,
          at: Utc,
      ) => readonly Readonly<
          { _tag: "Rejected"
          | "Missing" } & Readonly<{ message: T["inbound"]; sender: T["sender"] }>,
      >[]