title: How can i solve the error Subsequent property declarations must have the same type. Angular 9
body: <p>I've created a class of type <code>Posts</code> which has three fields of type string and I'm trying to access it from an Angular component class to set the three fields to their default values but I get the following error...</p>
  
  <pre class="lang-none prettyprint-override"><code>Subsequent property declarations must have the same type.  
  Property 'post1' must be of type 'Posts', but here has type 'any'
  </code></pre>
  
  <p><strong><em>Code of my <code>Posts</code> class</em></strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export class Posts{
      Key:string;
      Email:string;
      Password:string;
  }
  </code></pre>
  
  <p><strong><em>Code of how I'm trying to set the values in my Angular component class</em></strong></p>
  
  <pre class="lang-js prettyprint-override"><code>export class AppComponent {
    title = 'proyecto-nro2';
  
    post1 = new Posts();
  //Said the error above in every post1.
    post1.Key = 'NONE';
    post1.Email = 'NONE';
    post1.Password = '2';
  }
  </code></pre>