title: Argument of type 'number' is not assignable to parameter of type 'string'. when importing old project into a new one
body: <p>After importing my completed project into another project I suddenly get this error:</p>
  
  <pre><code>ERROR in src/app/avior/users/users.component.html:43:79 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
  
  43         &lt;form [formGroup]="userForm" class="form-signin" (ngSubmit)="onSubmit(selectedUser._id,this.userForm.value)"&gt;
  </code></pre>
  
  <p>My onSubmit function looks like this:</p>
  
  <pre><code>  onSubmit(id: string, data: User) {
        this.aviorBackend.putUser(id, data)
        .subscribe(
          res =&gt; {
                  console.log('Benutzer erneuert.');
                  console.log(id);
                  console.log(data);
                  console.log(res);
                  this.selectedUser = res;
                 },
                 error =&gt; {
                  console.log('Error while deleting user: ', error);
                          }
                  );
                        }
  </code></pre>
  
  <p>My original code in the old project is fully functional, how did this go wrong?
  Correct me if I wrong but this.userForm.value appears to be a number and it needs to be converted to a string?</p>
  
  <p><strong>UPDATE</strong>
  After following the advice I still get this error:</p>
  
  <pre><code>    ERROR in src/app/avior/users/users.component.html:59:83 - error TS2345: Argument of 
  type 'number' is not assignable to parameter of type 'string'.
  
      59     &lt;button class="btn btn-danger btn-block" type="submit" (click)="deleteUserBtn(selectedUser._id)"&gt;Löschen&lt;/button&gt;
  
   ~~~~~~~~~~~~~~~~
  </code></pre>
  
  <p><strong>UPDATE 2</strong>
  user interface:</p>
  
  <pre><code>import { Role } from './role';
  
  // was class and not interface!
  export interface User {
      _id: number;
      mandator?: number;
      loginId: string;
      lastname: string;
      firstname: string;
      password: string;
      eMail: string;
      group?: string;
      role?: Role;
      active?: boolean;
      token?: string;
  }
  </code></pre>