title: How do I use .then() to wait for and use the emitted value of a subscription without using await?
body: <p>I have two methods, the first one subscribes to the value of a service which in turn receives a value from a back-end API. I need to make use of this value in a separate method, so therefore I need to wait for the value of the API to be returned by the first method.</p>
  
  <p>The issue is that I don't want to turn the whole method async by using the await keyword, so instead I figured that making the first method return a promise and then using .then() to await the value would work. However when I run my code the console.log is just printing undefined. </p>
  
  <pre><code>  async determinePreselectedUsers(googleUsers: GoogleUser[]): Promise&lt;any&gt; {
      let emails: string[] = [];
  
      googleUsers.forEach(user =&gt; {
        emails.push(user.email);
      });
  
      await this._usersService.determinePreselectedUsers$(emails).subscribe(res =&gt; {
        return res;
      });
    }
  
    onOUSelect(selectedOrganisationalUnitPath: string) {
      this._usersService.getGoogleUsers$(selectedOrganisationalUnitPath).subscribe((googleUsers: GoogleUser[]) =&gt; {
         this.determinePreselectedUsers(googleUsers).then( preselectedUsers =&gt; {
           console.log("Preselected users: ", preselectedUsers); //This is undefined
         });
      });
    }
  </code></pre>
  
  <p>I assume there's a way to make this work without using await? </p>