Firebase / typescript issue - When I use this.ref.getAuth (). Password.email works, but I get an error like FirebaseAuthData

Firebase / typescript problem.

When I use this.ref.getAuth (). password.email works, but am I getting an error like FirebaseAuthData when starting the typescript compiler?

Do I need to update my version of typescript?

I am using typescript version 1.7.3 https://code.angularjs.org/tools/typescript.js

Or maybe my version of firebase, which is currently located: 2.3.2?

This is the error I get in the typescript compiler:

enter image description here

+5
source share
1 answer

The FirebaseAuthData interface does not contain a password attribute after viewing documents published by Kamen Minkov.

after viewing the code snippet, you can rewrite it as

var authData:FirebaseAuthData = this.ref.getAuth(); var email = authData['password']['email']; 

this probably won't cause ts compiler errors

+3
source

Source: https://habr.com/ru/post/1239789/


All Articles