Skip to content

Commit 1fcbfec

Browse files
committed
[AUTOMATED]: Prettier Code Styling
1 parent 90a907e commit 1fcbfec

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { IdTokenResult } from '../../model/id_token';
2020
import { User } from '../../model/user';
2121
import { PersistedBlob } from '../persistence';
2222
import { ProviderId } from '../providers';
23-
import { assert, assertStringOrUndefined} from '../util/assert';
23+
import { assert, assertStringOrUndefined } from '../util/assert';
2424
import { StsTokenManager } from './token_manager';
2525

2626
export interface UserParameters {

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,34 @@ import { logError } from './log';
2121

2222
/**
2323
* Unconditionally fails, throwing a developer facing INTERNAL_ERROR
24-
*
24+
*
2525
* @param appName App name for tagging the error
2626
* @throws FirebaseError
2727
*/
28-
export function fail(
29-
appName: string
30-
): never {
28+
export function fail(appName: string): never {
3129
throw AUTH_ERROR_FACTORY.create(AuthErrorCode.INTERNAL_ERROR, { appName });
3230
}
3331

3432
/**
3533
* Verifies the given condition and fails if false, throwing a developer facing error
36-
*
34+
*
3735
* @param assertion
38-
* @param appName
36+
* @param appName
3937
*/
4038
export function assert(assertion: boolean, appName: string): asserts assertion {
4139
if (!assertion) {
4240
fail(appName);
4341
}
4442
}
4543

46-
export function assertStringOrUndefined(assertion: unknown, appName: string): asserts assertion is string | undefined {
47-
assert(typeof assertion === 'string' || typeof assertion === 'undefined', appName);
44+
export function assertStringOrUndefined(
45+
assertion: unknown,
46+
appName: string
47+
): asserts assertion is string | undefined {
48+
assert(
49+
typeof assertion === 'string' || typeof assertion === 'undefined',
50+
appName
51+
);
4852
}
4953

5054
/**
@@ -56,8 +60,7 @@ export function assertStringOrUndefined(assertion: unknown, appName: string): as
5660
export function debugFail(failure: string): never {
5761
// Log the failure in addition to throw an exception, just in case the
5862
// exception is swallowed.
59-
const message =
60-
`AUTH (${SDK_VERSION}) INTERNAL ASSERTION FAILED: ` + failure;
63+
const message = `AUTH (${SDK_VERSION}) INTERNAL ASSERTION FAILED: ` + failure;
6164
logError(message);
6265

6366
// NOTE: We don't use FirestoreError here because these are internal failures
@@ -69,12 +72,15 @@ export function debugFail(failure: string): never {
6972
/**
7073
* Fails if the given assertion condition is false, throwing an Error with the
7174
* given message if it did.
72-
*
75+
*
7376
* @param assertion
7477
* @param message
7578
*/
76-
export function debugAssert(assertion: boolean, message: string): asserts assertion {
79+
export function debugAssert(
80+
assertion: boolean,
81+
message: string
82+
): asserts assertion {
7783
if (!assertion) {
7884
debugFail(message);
7985
}
80-
}
86+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ export function logError(msg: string, ...args: string[]): void {
4141
if (logClient.logLevel <= LogLevel.ERROR) {
4242
logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);
4343
}
44-
}
44+
}

0 commit comments

Comments
 (0)