title: Typescript Array is undefined
body: <p>I got a function which should save multiple JSON Objects into an Array of the Type "Contact"</p>
  
  <pre><code>getContacts(){
      let self = this;
      $.ajax({
          type: "GET",
          url: "/chat/contacts/",
          dataType:"json",
          success: function(response){
              let obj = response;
              let i = 1;
              let contacts: Contact[] = [];
              for (let key in obj) {
                  if (obj.hasOwnProperty(key)) {
                      let val = obj[key];
                      contacts[i].id = val["id"]; //&lt;-- contacts[i] is undefinded
                      contacts[i].partner = val["partnerId"];
                      contacts[i].name = val["name"];
                      contacts[i].type = val["type"];
                      console.log(contacts[i]);
                  }
              }
          },
          error: function(jqXHR, textStatus, errorThrown){
              alert(errorThrown);
          }
      });
  }
  </code></pre>
  
  <p>At the marked point it says </p>
  
  <blockquote>
    <p>contacts[i] is undefinded</p>
  </blockquote>
  
  <p>How do i have to initialize the Array to make it working?</p>
  
  <p>Here is the <strong>Contact</strong> Class:</p>
  
  <pre><code>class Contact extends BaseModel{
      static CCO_ID = "id";
      static CCO_PARTNER = "partner";
      static CCO_NAME = "name";
      static CCO_TYPE = "type";
  
  
      partner: Number;
      name: String;
      type: Number;
  }
  </code></pre>