title: TypeScript: inherit from Array
body: <p>I'm trying to create a rich data model for an AngularJS application and I would like for my model to inherit from <code>Array&lt;BaseModel&gt;</code>. I haven't found a way to do this (with confidence) yet. </p>
  
  <p>In pseudocode this would be something like:</p>
  
  <pre><code>// NOT REAL CODE. DOES NOT WORK
  class BaseModel {}
  class Person extends BaseModel {}
  class People extends Array&lt;Person&gt; {
      constructor(private promise:Promise) { }
      $unwrap(promise) { 
          promise.then((response) =&gt; {
              response.data.map((person) =&gt; {
                  this.push(new Person(person));
              });
          });
      }
      static $load() {
          /* do some ajaxy thing and unwrap the promise right onto the 
             the new instance of this rich model */
  
          return new People(promise);
      }
  }
  </code></pre>
  
  <p>The reason I would like something like this is that now I can bind this model directly to my view and get updates on the fly. </p>
  
  <p>Any thoughts on extending from Array?</p>