title: Property 'token' does not exist on type 'Promise<any>'
body: <p>I want to process a token. But get the message:</p>
  
  <p>Property 'token' does not exist on type 'Promise '</p>
  
  <p>I have the following code. I get a json with the property token. Incidentally, I am guided by a tutorial that uses Angular 2. I already tried it without ['token']. But without success. I also had an interface for the post, but I did not use it to eliminate errors. It also does not work with the interface.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>signin(email: string, password: string) {
      return this.http.post&lt;any&gt;('http://127.0.0.1:8000/api/userLogin',
        { email: email, password: password },
      this.httpOptions).map((response: Response) =&gt; {
        const token =  response.json()['token'];
        const base64Url = token.split('.')[1];
        const base64 = base64Url.replace('-', '+').replace('_', '/');
        return JSON.parse(window.atob(base64));
      });
  
    }
  </code></pre>
  
  <p>The Tutorial:</p>
  
  <p><a href="https://www.youtube.com/watch?v=pT9_FngJuzY&amp;t=321s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=pT9_FngJuzY&amp;t=321s</a></p>
  
  <p>By the way, in this case I use laravel / passport.</p>
  
  <pre><code>success:
  {token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjllOW…lsJiIWVmiiNY1Ft02MSWGS-Thx7_warYrUucP8bPHHnyMCfnU"}
  </code></pre>