refreshOnTransition
Call fn whenever any of the watched signals transitions from a
truthy "active" value to a non-active value. Generic version of
refreshOnRunEnd for callers tracking custom state machines.
Must be called within an injection context.
import { refreshOnTransition } from '@threadplane/langgraph';Declaration · overload 1
export declare function refreshOnTransition<T>(watch: Signal<T>, isActive: (v: T) => boolean, fn: () => void | Promise<void>): void;Type parameters
T
Parameters
watch· requiredSignal<T>isActive· required(v: T) => booleanfn· required() => void | Promise<void>
Returns
void