mycocepurus-smithii - v2.0.1
    Preparing search index...

    Type Alias Event

    Event:
        | { key: string; type: "claim" }
        | { age: number; key: string; type: "replay" }
        | { key: string; retainFor: number; type: "store" }
        | { key: string; type: "skip" }
        | { error: unknown; key: string; type: "release" }
        | {
            code: "in-flight" | "fingerprint-mismatch";
            key: string;
            type: "refuse";
        }
        | { key: string; operation: "complete"
        | "release"; type: "lost-claim" }
        | {
            error: unknown;
            key: string;
            operation: "claim" | "complete" | "release" | "forget";
            type: "store-error";
        }

    Everything observable. Reported, never thrown.

    release and store-error carry what went wrong; the rest are facts about what the ledger did, so a listener counts them without unpacking an error it does not need. key is the full store key, namespace and scope included.

    Type Declaration

    • { key: string; type: "claim" }
    • { age: number; key: string; type: "replay" }
    • { key: string; retainFor: number; type: "store" }
    • { key: string; type: "skip" }

      shouldStore declined, so the key was released instead.

    • { error: unknown; key: string; type: "release" }

      The action threw. The error is rethrown to the caller after this.

    • { code: "in-flight" | "fingerprint-mismatch"; key: string; type: "refuse" }
    • { key: string; operation: "complete" | "release"; type: "lost-claim" }

      The attempt outlived its lease and its claim was gone or replaced when it finished, so its outcome was not stored or its release did nothing. The value is still returned, or the action's error still rethrown.

    • {
          error: unknown;
          key: string;
          operation: "claim" | "complete" | "release" | "forget";
          type: "store-error";
      }