BACK
ReferenceEMPTY
Reference · 07

EMPTY

An Observable that completes immediately with no values.

Signature

const EMPTY: Observable

Marble diagram

EMPTY:  (|)

What it does

Emits only complete — no next, no error. It's the identity element for concat and merge: concat(a$, EMPTY)a$.

When to use

In catchError(() => EMPTY) to "swallow" an error without a value. A return value in conditional operators (iif, switchMap) when a stream should complete without emitting.

See also

NEVER, of, catchError

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