You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general the "Observer" concept is mentioned in the API type definitions and docs, but I don't see anything documented about what an Observer object would be. Everything just passes a function here, is that some Firebase internal type?
Ideally the type definitions here would be specific enough that typescript could infer the argument types of all of the callbacks used in all the various firebase apis. :)
The text was updated successfully, but these errors were encountered:
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
The firebase.d.ts file contains the following type definitions:
but this means you can't just pass a function like
and let |user| by in inferred type, because typescript thinks this method takes an Object. If we look at closure externs they're more specific:
firebase-js-sdk/externs/firebase-auth-externs.js
Line 873 in bc94aae
@param {!Object|function(?firebase.User)}
which would let you pass a callback without explicitly naming the type.
Steps to reproduce:
in typescript write:
In general the "Observer" concept is mentioned in the API type definitions and docs, but I don't see anything documented about what an Observer object would be. Everything just passes a function here, is that some Firebase internal type?
Ideally the type definitions here would be specific enough that typescript could infer the argument types of all of the callbacks used in all the various firebase apis. :)
The text was updated successfully, but these errors were encountered: