title: Argument of type X is not assignable to parameter of type X error in Angular 7
body: <p>I have two models named "UserBook" and "Comment".</p>
  
  <p>Book Model:
  book_comments is an array of type Comment</p>
  
  <pre><code>export class UserBook {
      id: number;
      book_name: string;
      book_comments: Array&lt;Comment[]&gt;;
  
      constructor(book) {
          this.id = book.id ? book.id : null;
          this.book_name = book.name ? book.name : null;
          this.book_comments = [];
      }
  }
  </code></pre>
  
  <p>Comment Model:</p>
  
  <pre><code>export class Comment {
      id: number;
      comment: string;
      date: string;
  
      constructor(comment) {
          this.id = comment.id ? comment.id : null;
          this.comment = comment.comment ? comment.comment : null;
          this.date = comment.date ? comment.date : null;
      }
  }
  </code></pre>
  
  <p>I want to create a new Comment and push it into UserBook's comments array</p>
  
  <pre><code>book: UserBook;
  
  postNewComment(comment): any {
  
      return this.http.post(environment.api + '/book/comments', {comment: comment}).pipe(
          tap(
              (response) =&gt; {
                  this.book.book_comments.unshift(new Comment(response['comment']));
              },
              (error) =&gt; {
                  console.log(error);
              }
          )
      );
  
  }
  </code></pre>
  
  <p>But I see this error.</p>
  
  <p>"Error: Argument of type Comment is not assignable to parameter of type Comment"</p>
  
  <p>If I change type of the book_comments to "any" then it works.</p>
  
  <p>But I couldn't understand why it doesn't accept type Comment[]. Can anyone help me about that. </p>