Type alias DynFilterFn<T>

    DynFilterFn<T>: {
        subscribe?: ((indexUpdate) => (() => void));
        (element): boolean;
    }

    Filter function that takes an element argument and returns a truthy value to keep it.

    This function has an optional subscribe function that follows the Svelte store Subscriber pattern. If a subscribe function is provided automatic updates to the reduced index is performed.

    Type Parameters

    • T

    Type declaration

      • (element): boolean
      • Parameters

        • element: T

          Element of backing data structure to filter.

        Returns boolean

    • Optional subscribe?: ((indexUpdate) => (() => void))

      Optional subscribe function following the Svelte store / subscribe pattern.

        • (indexUpdate): (() => void)
        • Parameters

          • indexUpdate: DynIndexerUpdateFn

            Callback function that is invoked on update / changes. Receives this reference.

          Returns (() => void)

            • (): void
            • Returns void