Genkit JS API reference
Preparing search index...
genkit
beta
SnapshotMutator
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
(
current
:
SessionSnapshot
<
S
>
|
undefined
)
:
SessionSnapshotInput
<
S
>
|
null
Parameters
current
:
SessionSnapshot
<
S
>
|
undefined
Returns
SessionSnapshotInput
<
S
>
|
null
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Genkit JS API reference
Loading...
A function that receives the current snapshot and returns the updated snapshot to persist.
nullto silently skip the update (no-op).