title: Could a .ts file contain multiple classes
body: <p>I want to create a <code>.ts</code> file which should contain my data model. Each data model maps to a <code>JSON</code> I'll either send or receive from the server. For eg. for user profile, the Json is</p>
  
  <pre><code> {
    "firstname" : "d",
    "lastname" : "d",
    "email" : "dd",
    "password" : "d"
  }
  </code></pre>
  
  <p>For above, I want to create a class as follows</p>
  
  <pre><code>export class UserProfile {
  
    constructor (public firstname:string,
                 public lastname:string,
                 public email:string,
                 public password:string){}
  }
  </code></pre>
  
  <p>Another JSON which the server might send is</p>
  
  <pre><code>{
  result:"success"
  addition-info:"something"
  }
  </code></pre>
  
  <p>The class for above is</p>
  
  <pre><code>export class Result{
  
    constructor (public result:string,
                 public additionalInfo:string){}
  }
  </code></pre>
  
  <p>Is there a best practice in Angular on how to create files for data models. Could I create a single <code>.ts</code> file say <code>BackendApiModels.ts</code> which should store all the classes or shall I create one <code>.ts</code> file for each data model? I don't even know if it is possible to create a <code>.ts</code> file which can contain multiple classes, eg</p>
  
  <p>BackendApi.ts</p>
  
  <pre><code> export class UserProfile {
  
        constructor (public firstname:string,
                     public lastname:string,
                     public email:string,
                     public password:string){}
      }
  
      export class Result{
  
        constructor (public result:string,
                     public additionalInfo:string){}
      }
  </code></pre>
  
  <p>Is is possible to create a file like above in Angular (multiple classes and the name of the classes do not match the filename)?</p>