Interface FilterFn<T>
interface FilterFn<T> {
subscribe?: (indexUpdate: IndexUpdateFn) => () => void;
(element: T): boolean;
}
subscribe?: (indexUpdate: IndexUpdateFn) => () => void;
(element: T): boolean;
}
Type Parameters
- Tany- Type of data.
- Parameters- element: TElement of backing data structure to filter. 
 - Returns boolean- Does the element pass the filter test. 
- element: T
Index
Properties
Properties
Optionalsubscribe
Optional subscribe function following the Svelte store / subscribe pattern.
Type Declaration
- (indexUpdate: IndexUpdateFn): () => void
- Parameters- indexUpdate: IndexUpdateFnCallback function that is invoked on update / changes. Receives thisreference.
 - Returns () => void
- indexUpdate: IndexUpdateFn
 
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.