Genkit JS API reference
    Preparing search index...

    Type Alias SnapshotMutator<S>

    SnapshotMutator: (
        current: SessionSnapshot<S> | undefined,
    ) => SessionSnapshotInput<S> | null

    A function that receives the current snapshot and returns the updated snapshot to persist.

    • Return the mutated snapshot to save it.
    • Return null to silently skip the update (no-op).
    • Throw to abort with an error (e.g. precondition failure).

    Type Parameters

    • S = unknown

    Type Declaration