@empathyco/x-components
Version:
Empathy X Components
24 lines (15 loc) • 1.47 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [StateSelector](./x-components.stateselector.md)
## StateSelector interface
Composition type of [SimpleStateSelector](./x-components.simplestateselector.md) which allows to indicate if the state selector should be executed in first instance (first assignment of values). Selector is the [SimpleStateSelector](./x-components.simplestateselector.md) and immediate flags if the selector should be executed when it is initialized for first time.
**Signature:**
```typescript
export interface StateSelector<ReturnType, State extends Dictionary, Getters extends Dictionary> extends WatchOptions
```
**Extends:** WatchOptions
## Properties
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [filter?](./x-components.stateselector.filter.md) | | (newValue: ReturnType, oldValue: ReturnType, state: State) => boolean | _(Optional)_ Asserts if the event should really be emitted taking into account the new and old values and the module state. |
| [metadata?](./x-components.stateselector.metadata.md) | | Partial<[WireMetadata](./x-components.wiremetadata.md)<!-- -->> | _(Optional)_ |
| [selector](./x-components.stateselector.selector.md) | | [SimpleStateSelector](./x-components.simplestateselector.md)<!-- --><ReturnType, State, Getters> | |