toPromise
signature: toPromise() : Promise
toPromise() : Promise
Convert observable to promise.
⚠ toPromise
is not a pipable operator, as it does not return an observable.
[![Ultimate RxJS](https://drive.google.com/uc?export=view&id=1qq2-q-eVe-F_-d0eSvTyqaGRjpfLDdJz "Ultimate RxJS")](https://ultimatecourses.com/courses/rxjs?ref=4)
Examples
Example 1: Basic Promise
Example 2: Using Promise.all
Additional Resources
toPromise 📰 - Official Docs
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/toPromise.ts
Last updated