title: Angular/typescript error: Type 'Observable<unknown>' is not assignable to type 'Observable<Blogpost>'
body: <p>I'm trying to call a service in my angular app but getting the following error on the ngOnInIt function in this line <code>this.currentBlog = this.route.paramMap.pipe(</code></p>
  
  <blockquote>
    <p>Type 'Observable' is not assignable to type 'Observable'. Type '{}' is missing the following properties from type 'Blogpost': id, title, short_desc, description, and 3 more.</p>
  </blockquote>
  
  <p>component.ts file:</p>
  
  <pre><code>import { Component, OnInit, OnDestroy } from '@angular/core';
  import { Router, ActivatedRoute, ParamMap} from '@angular/router';
  import { switchMap } from 'rxjs/operators';
  import { BlogpostService } from '../blogpost.service';
  import { Blogpost } from '../../models/blogpost';
  
  @Component({
    selector: 'app-blog-detail',
    templateUrl: './blog-detail.component.html',
    styleUrls: ['./blog-detail.component.css']})
  export class BlogDetailComponent implements OnInit, OnDestroy {
    public currentBlog: Observable&lt;Blogpost&gt;;
  
    constructor(private route: ActivatedRoute,private router: Router,private blogpostService: BlogpostService) {}
    ngOnInit() {
         this.currentBlog = this.route.paramMap.pipe(
                    switchMap((params: ParamMap) =&gt;
                      this.blogpostService.getSingleBlogInformation(+params.get('id'))));
  }
    ngOnDestroy(){
      ('blog-detail component destroyed')
    }}
  </code></pre>
  
  <p>Blogpost.ts:</p>
  
  <pre><code>export class Blogpost {
      id: number;
      title: string;
      short_desc: string;
      description: string;
      author: string;
      image: string;
      created_at: Date;}
  </code></pre>
  
  <p>Service.ts:</p>
  
  <pre><code>public getSingleBlogInformation(currentBlogId): any {
      let myResponse = this._http.get(this.baseUrl + 'getById.php?id=' + currentBlogId).pipe(
        catchError(this.handleError)
      );
      return myResponse;
    }
  </code></pre>