empty
연산자(operator) 정의: empty(scheduler: Scheduler): Observable
Observable that immediately completes.
Examples
Example 1: empty immediately completes
//Create observable that immediately completes
const example = Rx.Observable.empty();
//output: 'Complete!'
const subscribe = example.subscribe({
next: () => console.log('Next'),
complete: () => console.log('Complete!')
});
Follow the Source Code
Coming soon...
Additional Resources
- empty - Official docs
- Creation operators: empty, never, and throw - André Staltz
Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/observable/EmptyObservable.ts