manage Method
Defines management operators for all state streams. These operators are applied to the streams managed by this state, allowing you to modify or control their behavior, such as filtering, mapping, or handling errors, without altering the type of the emitted values
@param ...operators: OperatorFunction<T, T>[]
One or more RxJS operators to apply to the state streams
@returns this
The instance of the current state, allowing for method chaining
API
manage(...operators: OperatorFunction<T, T>[]): this;
Example
import {delay, filter} from 'rxjs';
import {state} from '@bitfiber/rx';
const data = state<number>(0, s => s
// All streams created by this state will delay and filter the data
.manage(
filter(id => !!(id % 2)),
delay(100),
));