empty
signature: empty(scheduler: Scheduler): Observable
empty(scheduler: Scheduler): Observable
Observable that immediately completes.
Examples
Example 1: empty immediately completes
( StackBlitz | jsBin | jsFiddle )
Example 2: empty
with timer
( StackBlitz )
Related Recipes
Additional Resources
empty 📰 - Official docs
Creation operators: empty, never, and throw 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/EmptyObservable.ts
Last updated