Interface FilterFn<T>
interface FilterFn<T> {
subscribe?:
| ((this: void, indexUpdate: IndexUpdateFn) => () => void)
| ((this: void, run: (value: any) => void) => () => void);
(element: T): boolean;
}
subscribe?:
| ((this: void, indexUpdate: IndexUpdateFn) => () => void)
| ((this: void, run: (value: any) => void) => () => void);
(element: T): boolean;
}
Type Parameters
- T
any- Type of data.
-
Parameters
- element: T
Element of backing data structure to filter.
Returns boolean
Does the element pass the filter test.
- element: T
Properties
Optionalsubscribe
subscribe?:
| ((this: void, indexUpdate: IndexUpdateFn) => () => void)
| ((this: void, run: (value: any) => void) => () => void)
| ((this: void, indexUpdate: IndexUpdateFn) => () => void)
| ((this: void, run: (value: any) => void) => () => void)
Optional subscribe function following the Svelte store / subscribe pattern.
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.