diff --git a/types.js b/types.js index e2d59f3..981cfb3 100644 --- a/types.js +++ b/types.js @@ -3,20 +3,20 @@ * @flow strict-local */ -export type RedirectEvent = { +export type RedirectEvent = {| url: 'string', -}; +|}; -export type BrowserResult = { +export type BrowserResult = {| type: 'cancel' | 'dismiss', -}; +|}; -export type RedirectResult = { +export type RedirectResult = {| type: 'success', url: string, -}; +|}; -type InAppBrowseriOSOptions = { +type InAppBrowseriOSOptions = {| dismissButtonStyle?: 'done' | 'close' | 'cancel', preferredBarTintColor?: string, preferredControlTintColor?: string, @@ -41,9 +41,9 @@ type InAppBrowseriOSOptions = { modalEnabled?: boolean, enableBarCollapsing?: boolean, ephemeralWebSession?: boolean, -}; +|}; -type InAppBrowserAndroidOptions = { +type InAppBrowserAndroidOptions = {| showTitle?: boolean, toolbarColor?: string, secondaryToolbarColor?: string, @@ -60,11 +60,8 @@ type InAppBrowserAndroidOptions = { hasBackButton?: boolean, browserPackage?: string, showInRecents?: boolean, -}; +|}; -export type InAppBrowserOptions = { - ...InAppBrowserAndroidOptions, - ...InAppBrowseriOSOptions -}; +export type InAppBrowserOptions = InAppBrowserAndroidOptions | InAppBrowseriOSOptions; export type AuthSessionResult = RedirectResult | BrowserResult;