@empathyco/x-components
Version:
Empathy X Components
29 lines (18 loc) • 1.48 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 |
| --- | --- | --- | --- |
| [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> | |
## Methods
| Method | Description |
| --- | --- |
| [filter(newValue, oldValue, state)?](./x-components.stateselector.filter.md) | _(Optional)_ Asserts if the event should really be emitted taking into account the new and old values and the module state. |