Type ‘Observable<User | null>’ is not assignable to type ‘Observable<User>’

  angular, observable, typescript

So here is the authService.ts :

 user$: Observable<firebase.User> 

 constructor(private afAuth: AngularFireAuth) { 
 this.user$ = afAuth.authState ;  //<-------- here's the problem
  }```                                                          
                                     

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.