[auth] Update typings as per #1185
This commit is contained in:
parent
34545f1b6e
commit
cb05d63236
@ -284,9 +284,9 @@ export default class PhoneAuthListener {
|
||||
|
||||
on(
|
||||
event: string,
|
||||
observer: () => PhoneAuthSnapshot,
|
||||
errorCb?: () => PhoneAuthError,
|
||||
successCb?: () => PhoneAuthSnapshot
|
||||
observer: PhoneAuthSnapshot => void,
|
||||
errorCb?: PhoneAuthError => void,
|
||||
successCb?: PhoneAuthSnapshot => void
|
||||
): this {
|
||||
if (!isString(event)) {
|
||||
throw new Error(
|
||||
@ -327,7 +327,7 @@ export default class PhoneAuthListener {
|
||||
* Promise .then proxy
|
||||
* @param fn
|
||||
*/
|
||||
then(fn: () => PhoneAuthSnapshot) {
|
||||
then(fn: PhoneAuthSnapshot => void) {
|
||||
this._promiseDeferred();
|
||||
// $FlowFixMe: Unsure how to annotate `bind` here
|
||||
if (this._promise) return this._promise.then.bind(this._promise)(fn);
|
||||
@ -338,7 +338,7 @@ export default class PhoneAuthListener {
|
||||
* Promise .catch proxy
|
||||
* @param fn
|
||||
*/
|
||||
catch(fn: () => Error) {
|
||||
catch(fn: Error => void) {
|
||||
this._promiseDeferred();
|
||||
// $FlowFixMe: Unsure how to annotate `bind` here
|
||||
if (this._promise) return this._promise.catch.bind(this._promise)(fn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user