title: Typescript Property 'length' does not exist on type
body: <p>I'm new to Typescript and have been trying to get the following snippet to work:</p>
  
  <pre><code>quoteService.getQuoteOfTheDay()
          .then(quotes =&gt; this.quote = quotes[Math.floor(Math.random() * quotes.length)]);
  </code></pre>
  
  <p>The idea is to randomly select a quote from the array.</p>
  
  <p>Instead I get the following error in Terminal <code>Property 'length' does not exist on type 'Quote'.</code></p>
  
  <p>If I change <code>quotes.length</code> to <code>4</code> the snippet works but I want to the function to figure out how many quotes there are and then randomly return a single one.</p>
  
  <p>Here is the entire Component below.</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { MaterialModule } from '@angular/material';
  import { Http } from '@angular/http';
  
  import { Quote } from './quote.model';
  import { QuoteService } from './quote.service';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css'],
    providers: [QuoteService]
  })
  
  export class AppComponent {
  
      title = 'App is running!';
      quote: Quote;
  
      constructor(quoteService: QuoteService) {
  
        quoteService.getQuoteOfTheDay()
          .then(quotes =&gt; this.quote = quotes[Math.floor(Math.random() * quotes.length)]);
  
      }
  }
  </code></pre>
  
  <p>The <strong>quote.service.ts</strong> was wrong </p>
  
  <pre><code>getQuoteOfTheDay(): Promise&lt;Quote&gt; {
      return this.http.get('quote.json').toPromise()
          .then(response =&gt; response.json());
  }
  </code></pre>
  
  <p>Should have been like this</p>
  
  <pre><code>getQuoteOfTheDay(): Promise&lt;any&gt; {
      return this.http.get('quote.json').toPromise()
          .then(response =&gt; response.json());
  }
  </code></pre>