API Reference

IndexWatchRuleclass

Context-aware rule wrapper used to enable recursive branch watching for selected indexes.

Overview

Index-watch-rule contracts, registry, and default recursive/non-recursive watch rules.

Import

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

Example

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

const instance = new IndexWatchRule(...args);

Members

2 members in this class.

constructor
constructorpublic
constructor(
  public context: unknown,
  private readonly predicate: ( index: unknown, target: unknown, context: unknown) => boolean
)

Parameters

Name
Type
Required
context
unknown
required
predicate
( index: unknown, target: unknown, context: unknown)
required
test
methodpublic
public test(
  index: unknown,
  target: unknown
): boolean

Parameters

Name
Type
Required
index
unknown
required
target
unknown
required

Returns

boolean