@threadplane/angularFunctionv0.3.7

refreshOnTransition

Calls fn each time the watched signal goes from an active value to an inactive one, as isActive judges them. The general form of refreshOnRunEnd, for a state machine of the app's own.

Call it in an injection context.

import { refreshOnTransition } from '@threadplane/angular';

Declaration · overload 1

export declare function refreshOnTransition<T>(watch: Signal<T>, isActive: (value: T) => boolean, fn: RefreshTarget): void;

Type parameters

T

Parameters

watch · required
Signal<T>
isActive · required
(value: T) => boolean
fn · required
RefreshTarget

Returns

void