BACK
ReferencewindowWhen
Reference · 120

windowWhen

windowWhen

rxjs.dev

Creates new Observable windows via a closingSelector.

Signature

windowWhen(closingSelector: () => ObservableInput): OperatorFunction>

What it does

Opens a window and calls closingSelector. When the closing Observable emits, the current window closes and the next opens.

When to use

Dynamic windows whose boundary depends on external state or a manual signal.

See also

bufferWhen, window

script.ts // TypeScript
CONSOLE · Console output
Hit Run to see the result...