Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(flow) - Make InAppBrowserOptions exact typed #258

Merged

Conversation

ronal2do
Copy link
Contributor

@ronal2do ronal2do commented May 3, 2021

Flow are complaining about the exact types, this small PR should fix this issue

Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/react-native-inappbrowser-reborn/types.js:65:35

Flow cannot determine a type for InAppBrowserOptions [1]. InAppBrowseriOSOptions [2] is inexact, so it may contain
toolbarColor with a type that conflicts with toolbarColor's definition in InAppBrowserAndroidOptions [3]. Can you make
InAppBrowseriOSOptions [2] exact?.

     62│   showInRecents?: boolean,
     63│ };
     64│
 [1] 65│ export type InAppBrowserOptions = {
 [3] 66│   ...InAppBrowserAndroidOptions,
 [2] 67│   ...InAppBrowseriOSOptions
     68│ };
     69│
     70│ export type AuthSessionResult = RedirectResult | BrowserResult;
     71│

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

Flow are complaining about the exact types, this small PR should fix this issue
```
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/react-native-inappbrowser-reborn/types.js:65:35

Flow cannot determine a type for InAppBrowserOptions [1]. InAppBrowseriOSOptions [2] is inexact, so it may contain
toolbarColor with a type that conflicts with toolbarColor's definition in InAppBrowserAndroidOptions [3]. Can you make
InAppBrowseriOSOptions [2] exact?.

     62│   showInRecents?: boolean,
     63│ };
     64│
 [1] 65│ export type InAppBrowserOptions = {
 [3] 66│   ...InAppBrowserAndroidOptions,
 [2] 67│   ...InAppBrowseriOSOptions
     68│ };
     69│
     70│ export type AuthSessionResult = RedirectResult | BrowserResult;
     71│

```
types.js Show resolved Hide resolved
@jdnichollsc
Copy link
Member

I'm going to fix the type issue from develop, thanks for your help mate! <3

@jdnichollsc jdnichollsc merged commit 9ebec41 into proyecto26:develop Jun 25, 2021
@jdnichollsc jdnichollsc mentioned this pull request Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants