Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2339: Property 'uid' does not exist on type '{} #62

Open
aashish-ak opened this issue Jun 30, 2018 · 2 comments
Open

error TS2339: Property 'uid' does not exist on type '{} #62

aashish-ak opened this issue Jun 30, 2018 · 2 comments

Comments

@aashish-ak
Copy link

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 '{}
@jorluiseptor
Copy link

i'm getting that, too.

@codediodeio
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants