title: Error: Type is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor
body: <p>I've written this function in TypeScript:</p>
  <pre class="lang-js prettyprint-override"><code>export class LoginService {
  
    async isLoggedIn(): boolean {
      const r = await this.http.get('http://localhost:3000/api/user/isLoggedIn').toPromise();
      return r.body;
    }
  }
  </code></pre>
  <p>When I try to run the Angular 6 application, I'm getting this error message:</p>
  <p>ERROR in src/app/login.service.ts(28,23): error TS1055: Type 'boolean' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.</p>
  <p>I've used async/await in other applications before without hitting this before.</p>
  <p>UPDATE:
  The question I would like answered is: how do I get the &quot;isLoggedIn&quot; function to return a boolean?</p>