Hi. Sometimes we need to add various rxjs operators to signals (for example, debounceTime), and we have to do this through a double conversion first to the stream, then to the signal back. I suggest adding a utility for this.
Expected API:
const result = applyRxJSOperator(source, debounceTime(1000));
const result = applyRxJSOperator(source, pipe(debounceTime(1000), map(i => i + 1)));
Draft implementation:
function applyRxJSOperator(signal: Signal, operator: OperatorFunction): Signal {
const streamFromSignal = toObservable(signal);
return toSignal(streamFromSignal.pipe(operator));
}
Hi. Sometimes we need to add various rxjs operators to signals (for example, debounceTime), and we have to do this through a double conversion first to the stream, then to the signal back. I suggest adding a utility for this.
Expected API:
Draft implementation:
If you support the idea, I can do it...