empty

연산자(operator) 정의: empty(scheduler: Scheduler): Observable

Observable that immediately completes.

Examples

Example 1: empty immediately completes

( jsBin | jsFiddle )

//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


:file_folder: Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/observable/EmptyObservable.ts

results matching ""

    No results matching ""