title: Type 'Observable' is missing the following properties from type 'User'
body: <p>i want to get user data from firestore, but i get the error</p>
  <blockquote>
  <p>Type 'Observable' is missing the following properties from type 'User': email, emailVerified, uidts(2739)</p>
  </blockquote>
  <p>user.service.ts</p>
  <pre><code>import { Injectable } from '@angular/core';
  import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/firestore';
  import { User } from '../_classes/user';
  
  @Injectable({
    providedIn: 'root'
  })
  export class UserService {
    private dbPath = '/users';
    usersRef: AngularFirestoreCollection&lt;User&gt;;
    userData: User;
  
    constructor(private db: AngularFirestore) {
      this.usersRef = db.collection(this.dbPath);
      this.getUserData();
    }
  
    private getUserData():User {
      const userId = JSON.parse(localStorage.getItem('currentUser')).uid;
  
      ** Here comes the error **
      this.userData = this.usersRef.doc(userId).valueChanges();
    }
  
    get UserData():User {
      return this.userData;
    }
  }
  </code></pre>
  <p>user.ts</p>
  <pre><code>export class User {
  email: string;
  emailVerified: boolean;
  firstName?: string;
  lastName?: string;
  mitarbeiter?: boolean;
  phone?: string;
  uid: string;
  </code></pre>
  <p>}</p>
  <p><a href="https://i.stack.imgur.com/NJxcd.png" rel="nofollow noreferrer">firebase firestore user example</a></p>