Interface DynDerivedAPI<D, K, T>

Provides the public API for derived reducers. There are several ways to create a derived reducer from utilizing the default implementation or passing in a constructor function / class for a custom derived reducer.

This class forms the public API which is accessible from the .derived getter in the main reducer implementation.

const dynArray = new DynArrayReducer([...]);
dynArray.derived.clear();
dynArray.derived.create(...);
dynArray.derived.delete(...);
dynArray.derived.destroy();
dynArray.derived.get(...);

K, T

interface DynDerivedAPI<D, K, T> {
    clear(): void;
    create(options: DynOptionsDerivedCreate<T>): DynDerivedReducer<D, K, T>;
    delete(name: string): boolean;
    destroy(): void;
    get(name: string): DynDerivedReducer<D, K, T>;
}

Type Parameters

  • D
  • K
  • T

Methods

  • Removes all derived reducers and associated subscriptions.

    Returns void

  • Deletes and destroys a derived reducer.

    Parameters

    • name: string

      Name of the derived reducer

    Returns boolean

    Whether the derived reducer was deleted.

  • Removes all derived reducers, associated subscriptions, and cleans up all resources.

    Returns void