//Create observable that immediately completes
const example = Rx.Observable.empty();
//output: 'Complete!'
const subscribe = example.subscribe({
next: () => console.log('Next'),
complete: () => console.log('Complete!')
});
Coming soon...
- empty 📰 - Official docs
- Creation operators: empty, never, and throw 📹 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/observable/EmptyObservable.ts