Skip to content

Commit 0c99d45

Browse files
fix: fixes signInFailure return type (#812)
Updates signInFailure's return type to also include void to match external documentation. Fixes #770
1 parent a848b99 commit 0c99d45

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* Fixes `signInFailure` return type to also include void to match external documentation. Fixes
2+
https://github.com/firebase/firebaseui-web/issues/770

externs/firebaseui-externs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,8 +674,8 @@ firebaseui.auth.Callbacks.prototype.signInSuccessWithAuthResult =
674674
*
675675
* @param {!firebaseui.auth.AuthUIError} error The FirebaseUI error identifying
676676
* the reason behind the failure.
677-
* @return {!Promise<void>} A promise that resolves when the merge conflict
678-
* is completed.
677+
* @return {!Promise<void>|void} Either void or a promise that resolves when the
678+
* merge conflict is completed.
679679
*/
680680
firebaseui.auth.Callbacks.prototype.signInFailure = function(error) {};
681681

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface Callbacks {
2424
authResult: any,
2525
redirectUrl?: string
2626
): boolean;
27-
signInFailure?(error: firebaseui.auth.AuthUIError): Promise<void>;
27+
signInFailure?(error: firebaseui.auth.AuthUIError): Promise<void>|void;
2828
uiShown?(): void;
2929
}
3030

0 commit comments

Comments
 (0)