angular-firestarter
angular-firestarter copied to clipboard
error TS2339: Property 'uid' does not exist on type '{}
switchMap(user => {
if (user) {
return this.afs.doc<User>(`users/${user.uid}`).valueChanges();
} else {
return of(null);
}
})
This function in the auth.service.ts constructor, is giving the following error during compilation:
error TS2339: Property 'uid' does not exist on type '{}
i'm getting that, too.
It sounds like TS is not getting the right type. Does this fix it at line 33?
switchMap((user as any) => ...)
We might need to explicitly type this to the Firebase SDK user type