UNPKG

@empathyco/x-components

Version:
96 lines (43 loc) 1.76 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [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 <table><thead><tr><th> Property </th><th> Modifiers </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> [filter?](./x-components.stateselector.filter.md) </td><td> </td><td> (newValue: ReturnType, oldValue: ReturnType, state: State) =&gt; boolean </td><td> _(Optional)_ Asserts if the event should really be emitted taking into account the new and old values and the module state. </td></tr> <tr><td> [metadata?](./x-components.stateselector.metadata.md) </td><td> </td><td> Partial&lt;[WireMetadata](./x-components.wiremetadata.md)<!-- -->&gt; </td><td> _(Optional)_ </td></tr> <tr><td> [selector](./x-components.stateselector.selector.md) </td><td> </td><td> [SimpleStateSelector](./x-components.simplestateselector.md)<!-- -->&lt;ReturnType, State, Getters&gt; </td><td> </td></tr> </tbody></table>