Skip to content

Commit 691112c

Browse files
chrisbobbegnprice
authored andcommitted
expo-web-browser libdef [nfc]: Decrease indent, to simplify diff
1 parent abb2223 commit 691112c

File tree

1 file changed

+123
-123
lines changed

1 file changed

+123
-123
lines changed

flow-typed/expo-web-browser_vx.x.x.js

Lines changed: 123 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -5,139 +5,139 @@
55
*/
66

77
declare module 'expo-web-browser' {
8-
import type {
9-
WebBrowserAuthSessionResult,
10-
WebBrowserCoolDownResult,
11-
WebBrowserCustomTabsResults,
12-
WebBrowserMayInitWithUrlResult,
13-
WebBrowserOpenOptions,
14-
WebBrowserRedirectResult,
15-
WebBrowserResult,
16-
WebBrowserWarmUpResult,
17-
WebBrowserWindowFeatures,
18-
} from 'expo-web-browser/build/WebBrowser.types';
8+
import type {
9+
WebBrowserAuthSessionResult,
10+
WebBrowserCoolDownResult,
11+
WebBrowserCustomTabsResults,
12+
WebBrowserMayInitWithUrlResult,
13+
WebBrowserOpenOptions,
14+
WebBrowserRedirectResult,
15+
WebBrowserResult,
16+
WebBrowserWarmUpResult,
17+
WebBrowserWindowFeatures,
18+
} from 'expo-web-browser/build/WebBrowser.types';
1919

20-
declare export * from 'expo-web-browser/build/WebBrowser.types'
21-
declare export function getCustomTabsSupportingBrowsersAsync(): Promise<WebBrowserCustomTabsResults>;
22-
declare export function warmUpAsync(browserPackage?: string): Promise<WebBrowserWarmUpResult>;
23-
declare export function mayInitWithUrlAsync(
24-
url: string,
25-
browserPackage?: string,
26-
): Promise<WebBrowserMayInitWithUrlResult>;
27-
declare export function coolDownAsync(browserPackage?: string): Promise<WebBrowserCoolDownResult>;
28-
declare export function openBrowserAsync(
29-
url: string,
30-
browserParams?: WebBrowserOpenOptions,
31-
): Promise<WebBrowserResult>;
32-
declare export function dismissBrowser(): void;
33-
declare export function openAuthSessionAsync(
34-
url: string,
35-
redirectUrl: string,
36-
browserParams?: WebBrowserOpenOptions,
37-
): Promise<WebBrowserAuthSessionResult>;
38-
declare export function dismissAuthSession(): void;
20+
declare export * from 'expo-web-browser/build/WebBrowser.types'
21+
declare export function getCustomTabsSupportingBrowsersAsync(): Promise<WebBrowserCustomTabsResults>;
22+
declare export function warmUpAsync(browserPackage?: string): Promise<WebBrowserWarmUpResult>;
23+
declare export function mayInitWithUrlAsync(
24+
url: string,
25+
browserPackage?: string,
26+
): Promise<WebBrowserMayInitWithUrlResult>;
27+
declare export function coolDownAsync(browserPackage?: string): Promise<WebBrowserCoolDownResult>;
28+
declare export function openBrowserAsync(
29+
url: string,
30+
browserParams?: WebBrowserOpenOptions,
31+
): Promise<WebBrowserResult>;
32+
declare export function dismissBrowser(): void;
33+
declare export function openAuthSessionAsync(
34+
url: string,
35+
redirectUrl: string,
36+
browserParams?: WebBrowserOpenOptions,
37+
): Promise<WebBrowserAuthSessionResult>;
38+
declare export function dismissAuthSession(): void;
3939

40-
/**
41-
* Attempts to complete an auth session in the browser.
42-
* @param options
43-
*/
44-
declare export function maybeCompleteAuthSession(options?: {
45-
skipRedirectCheck?: boolean,
46-
...
47-
}): {
48-
type: 'success' | 'failed',
49-
message: string,
50-
...
51-
};
40+
/**
41+
* Attempts to complete an auth session in the browser.
42+
* @param options
43+
*/
44+
declare export function maybeCompleteAuthSession(options?: {
45+
skipRedirectCheck?: boolean,
46+
...
47+
}): {
48+
type: 'success' | 'failed',
49+
message: string,
50+
...
51+
};
5252
}
5353

5454
declare module 'expo-web-browser/build/WebBrowser.types' {
55-
declare export type RedirectEvent = {
56-
url: string,
57-
...
58-
};
59-
declare export type WebBrowserWindowFeatures = {
60-
[key: string]: number | boolean | string,
61-
...,
62-
};
63-
declare export type WebBrowserOpenOptions = {
64-
/**
65-
* Color of the toolbar in either #AARRGGBB or #RRGGBB format.
66-
*/
67-
toolbarColor?: string,
68-
browserPackage?: string,
55+
declare export type RedirectEvent = {
56+
url: string,
57+
...
58+
};
59+
declare export type WebBrowserWindowFeatures = {
60+
[key: string]: number | boolean | string,
61+
...,
62+
};
63+
declare export type WebBrowserOpenOptions = {
64+
/**
65+
* Color of the toolbar in either #AARRGGBB or #RRGGBB format.
66+
*/
67+
toolbarColor?: string,
68+
browserPackage?: string,
6969

70-
/**
71-
* Whether the toolbar should be hiding when a user scrolls the website.
72-
*/
73-
enableBarCollapsing?: boolean,
70+
/**
71+
* Whether the toolbar should be hiding when a user scrolls the website.
72+
*/
73+
enableBarCollapsing?: boolean,
7474

75-
/**
76-
* Android only
77-
*/
78-
/**
79-
* Color of the secondary toolbar in either #AARRGGBB or #RRGGBB format.
80-
*/
81-
secondaryToolbarColor?: string,
75+
/**
76+
* Android only
77+
*/
78+
/**
79+
* Color of the secondary toolbar in either #AARRGGBB or #RRGGBB format.
80+
*/
81+
secondaryToolbarColor?: string,
8282

83-
/**
84-
* Whether the browser should show the title of website on the toolbar.
85-
*/
86-
showTitle?: boolean,
87-
enableDefaultShareMenuItem?: boolean,
83+
/**
84+
* Whether the browser should show the title of website on the toolbar.
85+
*/
86+
showTitle?: boolean,
87+
enableDefaultShareMenuItem?: boolean,
8888

89-
/**
90-
* Whether browsed website should be shown as separate entry in Android recents/multitasking view.
91-
* Default: `false`
92-
*/
93-
showInRecents?: boolean,
89+
/**
90+
* Whether browsed website should be shown as separate entry in Android recents/multitasking view.
91+
* Default: `false`
92+
*/
93+
showInRecents?: boolean,
9494

95-
/**
96-
* iOS only
97-
*/
98-
controlsColor?: string,
99-
dismissButtonStyle?: 'done' | 'close' | 'cancel',
100-
readerMode?: boolean,
95+
/**
96+
* iOS only
97+
*/
98+
controlsColor?: string,
99+
dismissButtonStyle?: 'done' | 'close' | 'cancel',
100+
readerMode?: boolean,
101101

102-
/**
103-
* **Web:** name to assign to the popup window.
104-
*/
105-
windowName?: string,
102+
/**
103+
* **Web:** name to assign to the popup window.
104+
*/
105+
windowName?: string,
106106

107-
/**
108-
* **Web:** features to use with `window.open()`
109-
*/
110-
windowFeatures?: string | WebBrowserWindowFeatures,
111-
...
112-
};
113-
declare export type WebBrowserAuthSessionResult = WebBrowserRedirectResult | WebBrowserResult;
114-
declare export type WebBrowserCustomTabsResults = {
115-
defaultBrowserPackage?: string,
116-
preferredBrowserPackage?: string,
117-
browserPackages: string[],
118-
servicePackages: string[],
119-
...
120-
};
121-
declare export var WebBrowserResultType: {|
122-
+CANCEL: 'cancel', // "cancel"
123-
+DISMISS: 'dismiss', // "dismiss"
124-
+OPENED: 'opened', // "opened"
125-
+LOCKED: 'locked', // "locked"
126-
|};
127-
declare export type WebBrowserResult = {
128-
type: $Values<typeof WebBrowserResultType>,
129-
...
130-
};
131-
declare export type WebBrowserRedirectResult = {
132-
type: 'success',
133-
url: string,
134-
...
135-
};
136-
declare export type ServiceActionResult = {
137-
servicePackage?: string,
138-
...
139-
};
140-
declare export type WebBrowserMayInitWithUrlResult = ServiceActionResult;
141-
declare export type WebBrowserWarmUpResult = ServiceActionResult;
142-
declare export type WebBrowserCoolDownResult = ServiceActionResult;
107+
/**
108+
* **Web:** features to use with `window.open()`
109+
*/
110+
windowFeatures?: string | WebBrowserWindowFeatures,
111+
...
112+
};
113+
declare export type WebBrowserAuthSessionResult = WebBrowserRedirectResult | WebBrowserResult;
114+
declare export type WebBrowserCustomTabsResults = {
115+
defaultBrowserPackage?: string,
116+
preferredBrowserPackage?: string,
117+
browserPackages: string[],
118+
servicePackages: string[],
119+
...
120+
};
121+
declare export var WebBrowserResultType: {|
122+
+CANCEL: 'cancel', // "cancel"
123+
+DISMISS: 'dismiss', // "dismiss"
124+
+OPENED: 'opened', // "opened"
125+
+LOCKED: 'locked', // "locked"
126+
|};
127+
declare export type WebBrowserResult = {
128+
type: $Values<typeof WebBrowserResultType>,
129+
...
130+
};
131+
declare export type WebBrowserRedirectResult = {
132+
type: 'success',
133+
url: string,
134+
...
135+
};
136+
declare export type ServiceActionResult = {
137+
servicePackage?: string,
138+
...
139+
};
140+
declare export type WebBrowserMayInitWithUrlResult = ServiceActionResult;
141+
declare export type WebBrowserWarmUpResult = ServiceActionResult;
142+
declare export type WebBrowserCoolDownResult = ServiceActionResult;
143143
}

0 commit comments

Comments
 (0)