2
0
mirror of synced 2025-02-03 01:53:43 +00:00

[auth] Update typings as per #1185

This commit is contained in:
Chris Bianca 2018-06-17 16:07:23 +01:00
parent 34545f1b6e
commit cb05d63236

View File

@ -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);