Skip to content

Commit 7a04e8a

Browse files
committed
formatting
1 parent b1cbfd4 commit 7a04e8a

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

packages-exp/auth-exp/src/platform_browser/iframe/gapi.iframes.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ declare namespace gapi.iframes {
4242
type Callback = (iframe: Iframe) => void;
4343

4444
class Context {
45-
open(options: Record<string, unknown>, callback?: Callback): Promise<Iframe>;
45+
open(
46+
options: Record<string, unknown>,
47+
callback?: Callback
48+
): Promise<Iframe>;
4649
}
4750

4851
class Iframe {
@@ -52,7 +55,10 @@ declare namespace gapi.iframes {
5255
filter?: IframesFilter
5356
): void;
5457
ping(callback: SendCallback, data?: unknown): Promise<unknown[]>;
55-
restyle(style: Record<string, string|boolean>, callback?: SendCallback): Promise<unknown[]>;
58+
restyle(
59+
style: Record<string, string | boolean>,
60+
callback?: SendCallback
61+
): Promise<unknown[]>;
5662
}
5763

5864
const CROSS_ORIGIN_IFRAMES_FILTER: IframesFilter;

packages-exp/auth-exp/src/platform_browser/iframe/gapi.test.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,18 @@ describe('src/platform_browser/iframe/gapi', () => {
4848
auth = await testAuth();
4949
});
5050

51-
function makeGapi(
52-
result: unknown,
53-
timesout = false
54-
): typeof gapi {
51+
function makeGapi(result: unknown, timesout = false): typeof gapi {
5552
const callbackFn = timesout === false ? 'callback' : 'ontimeout';
56-
return {
53+
return ({
5754
load: sinon
5855
.stub()
5956
.callsFake((_name: string, params: Record<string, Function>) =>
6057
params[callbackFn]()
6158
),
6259
iframes: {
63-
getContext: () => result as gapi.iframes.Context,
60+
getContext: () => result as gapi.iframes.Context
6461
}
65-
} as unknown as typeof gapi;
62+
} as unknown) as typeof gapi;
6663
}
6764

6865
afterEach(() => {

packages-exp/auth-exp/src/platform_browser/iframe/iframe.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,12 @@ export async function _openIframe(auth: Auth): Promise<gapi.iframes.Iframe> {
6666
setHideOnLeave: false
6767
});
6868

69-
const networkError = AUTH_ERROR_FACTORY.create(AuthErrorCode.NETWORK_REQUEST_FAILED, {
70-
appName: auth.name
71-
});
69+
const networkError = AUTH_ERROR_FACTORY.create(
70+
AuthErrorCode.NETWORK_REQUEST_FAILED,
71+
{
72+
appName: auth.name
73+
}
74+
);
7275
// Confirm iframe is correctly loaded.
7376
// To fallback on failure, set a timeout.
7477
const networkErrorTimer = AUTH_WINDOW.setTimeout(() => {

0 commit comments

Comments
 (0)