title: What should I use instead of toPromise() when using await on an Observable?
body: <p><a href="https://www.learnrxjs.io/operators/utility/topromise.html" rel="noreferrer">This page</a> says <code>"toPromise has been deprecated! (RxJS 5.5+)"</code> but I've been using it lately with AngularFire2 (when I only want one result) like this:</p>
  
  <pre><code>const foo = await this.afs.doc(`docPath`).valueChanges().toPromise();
  </code></pre>
  
  <p>Should I not be doing this? If not, what is the <code>await</code> alternative?</p>
  
  <p>UPDATE:</p>
  
  <p>After the answer below I've changed this:</p>
  
  <pre><code>const foo = await this.afs.doc(`docPath`).valueChanges().toPromise();
  </code></pre>
  
  <p>...to this:</p>
  
  <pre><code>const foo = await (new Promise(resolve =&gt; this.afs.doc(`docPath`).valueChanges().pipe(first()).subscribe(result =&gt; resolve(result))));
  </code></pre>
  
  <p>Could someone please explain to me how this is an improvement?! Seems like a step backward to me.</p>