API Reference

IWatchCallbacksinterface

Zero-allocation callback bundle for change, context-change, and cycle events.

Overview

Watch-factory runtime that provides keyed, reference-counted watch handles and zero-allocation listener dispatch hooks.

Declaration

export interface IWatchCallbacks {
  onChanged: (change: IStateChange) => void;
  onContextChanged: (change: IContextChanged) => void;
  onStartChangeCycle: (cycle: IChangeCycleIndex) => void;
  onEndChangeCycle: (cycle: IChangeCycleIndex) => void;
}

Import

import type { IWatchCallbacks } from '@rs-x/state-manager';

Members

4 members in this interface.

onChanged
property
onChanged: (change: IStateChange) => void

Type

(change: IStateChange) => void

onContextChanged
property
onContextChanged: (change: IContextChanged) => void

Type

(change: IContextChanged) => void

onEndChangeCycle
property
onEndChangeCycle: (cycle: IChangeCycleIndex) => void

Type

(cycle: IChangeCycleIndex) => void

onStartChangeCycle
property
onStartChangeCycle: (cycle: IChangeCycleIndex) => void

Type

(cycle: IChangeCycleIndex) => void