Skip to content

Commit 58c4e9f

Browse files
committed
More PR Feedback
1 parent d0a6382 commit 58c4e9f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages-exp/auth-exp/src/core/user/user_impl.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export interface UserParameters {
3434
photoURL?: string;
3535
}
3636

37-
3837
function assertStringOrUndefined(
3938
assertion: unknown,
4039
appName: string
@@ -115,7 +114,7 @@ export class UserImpl implements User {
115114
photoURL
116115
} = object;
117116

118-
assert(uid && !!plainObjectTokenManager, auth.name);
117+
assert(uid && plainObjectTokenManager, auth.name);
119118

120119
const stsTokenManager = StsTokenManager.fromPlainObject(
121120
auth.name,

packages-exp/auth-exp/src/core/util/assert.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ export function fail(appName: string, errorCode: AuthErrorCode): never {
3434
* @param assertion
3535
* @param appName
3636
*/
37-
export function assert(assertion: unknown, appName: string, errorCode: AuthErrorCode = AuthErrorCode.INTERNAL_ERROR): asserts assertion {
37+
export function assert(
38+
assertion: unknown,
39+
appName: string,
40+
errorCode: AuthErrorCode = AuthErrorCode.INTERNAL_ERROR
41+
): asserts assertion {
3842
if (!assertion) {
3943
fail(appName, errorCode);
4044
}
@@ -66,7 +70,7 @@ export function debugFail(failure: string): never {
6670
* @param message
6771
*/
6872
export function debugAssert(
69-
assertion: boolean,
73+
assertion: unknown,
7074
message: string
7175
): asserts assertion {
7276
if (!assertion) {

0 commit comments

Comments
 (0)