title: Creating a new instance of a class in typescript
body: <p>I'm trying to create a new instance of a class, with empty values but I'm struggling with the code.</p>
  
  <p>Here's my class file code:</p>
  
  <pre><code>export class MyTimeDefinition {
      RequestCodes: Array&lt;RequestCodes&gt;;
      BalanceCodes: Array&lt;BalanceCodes&gt;;
      ID: number;
      Description: {
          SelectedLanguage: number,
          Values: {
              LanguageID: number,
              ValueID: number,
              Value: string
          }[]
      };
      IsDataLoaded: boolean;
      TypeName: string;
  }
  
  export interface RequestCodes {
      ID: number;
      StringValue: string;
  }
  
  export interface BalanceCodes {
      ID: number;
      StringValue: string;
  }
  </code></pre>
  
  <p>and in my component I try to create a new instance of the class like this:</p>
  
  <pre><code>//Create New MyTime-Definition
  public createNewMyTimeDefinition() {
      let newMyTimeDefinition = new models.MyTimeDefinition();
      console.log(newMyTimeDefinition);
  }
  </code></pre>
  
  <p>the result of my console.log is <code>MyTimeDefinition {}</code> how can I create the variable <em>newMyTimeDefinition</em> that has all the attributes of the class and not just an empty object?</p>