of
signature: of(...values, scheduler: Scheduler): Observable
of(...values, scheduler: Scheduler): Observable
Emit variable amount of values in a sequence and then emits a complete notification.
Examples
Example 1: Emitting a sequence of numbers
( StackBlitz | jsBin | jsFiddle )
Example 2: Emitting an object, array, and function
( StackBlitz | jsBin | jsFiddle )
Related Recipes
Additional Resources
of 📰 - Official docs
of - In Depth Dev Reference
Creation operators: of 🎥 💵 - André Staltz
Build your own of operator 🎥 - Kwinten Pisman
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/of.ts
Last updated