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

Whole lotta Flow errors (react-native MaskedView & metro-bundler) #15145

Closed
Palisand opened this issue Jul 21, 2017 · 1 comment
Closed

Whole lotta Flow errors (react-native MaskedView & metro-bundler) #15145

Palisand opened this issue Jul 21, 2017 · 1 comment
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Palisand
Copy link

Palisand commented Jul 21, 2017

Feast your eyes:

node_modules/metro-bundler/build/node-haste/DependencyGraph/HasteMap.js.flow:64
 64:     (this: any)._processHastePackage = throat(1, this._processHastePackage.bind(this));
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call. Could not decide which case to select
 64:     (this: any)._processHastePackage = throat(1, this._processHastePackage.bind(this));
                                            ^^^^^^ intersection type
  Case 1 may work:
    3: declare function throat<TResult, TFn: (...args: Array<any>) => Promise<TResult>>(size: number, fn: TFn): TFn;
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See: node_modules/throat/index.js.flow:3
  But if it doesn't, case 3 looks promising too:
    5: declare function throat(size: number): <TResult>(fn: () => Promise<TResult>) => Promise<TResult>;
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/throat/index.js.flow:5
  Please provide additional annotation(s) to determine whether case 1 works (or consider merging it with case 3):
  165:   _processHastePackage(file: string, previousName: ?string) {
                                                                  ^ return

node_modules/metro-bundler/build/node-haste/DependencyGraph/HasteMap.js.flow:65
 65:     (this: any)._processHasteModule = throat(1, this._processHasteModule.bind(this));
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function call. Could not decide which case to select
 65:     (this: any)._processHasteModule = throat(1, this._processHasteModule.bind(this));
                                           ^^^^^^ intersection type
  Case 1 may work:
    3: declare function throat<TResult, TFn: (...args: Array<any>) => Promise<TResult>>(size: number, fn: TFn): TFn;
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ polymorphic type: function type. See: node_modules/throat/index.js.flow:3
  But if it doesn't, case 3 looks promising too:
    5: declare function throat(size: number): <TResult>(fn: () => Promise<TResult>) => Promise<TResult>;
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function type. See: node_modules/throat/index.js.flow:5
  Please provide additional annotation(s) to determine whether case 1 works (or consider merging it with case 3):
  150:   _processHasteModule(file: string, previousName: ?string) {
                                                                 ^ return

node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js:70
 70:   static propTypes = {
                          ^ property `onLayout`. Property not found in any member of intersection type
 49:   static propTypes: $Subtype<{[_: $Keys<Props>]: any}>; //object whose keys are in PropTypes
                                       ^^^^^^^^^^^^ intersection. See lib: /private/tmp/flow/flowlib_3a47f599/react.js:49
  Member 1:
   22: type Props = ViewProps & {
                    ^^^^^^^^^ ViewProps
  Error:
   70:   static propTypes = {
                            ^ property `onLayout`. Property not found in any member of intersection type
   22: type Props = ViewProps & {
                    ^^^^^^^^^ intersection
    Member 1:
     41: export type ViewProps = {
                                 ^ object type. See: node_modules/react-native/Libraries/Components/View/ViewPropTypes.js:41
    Error:
     70:   static propTypes = {
                              ^ property `onLayout`. Property not found in
     41: export type ViewProps = {
                                 ^ object type. See: node_modules/react-native/Libraries/Components/View/ViewPropTypes.js:41
    Member 2:
     71: } & TVViewProps;
             ^^^^^^^^^^^ TVViewProps. See: node_modules/react-native/Libraries/Components/View/ViewPropTypes.js:71
    Error:
     70:   static propTypes = {
                              ^ property `onLayout`. Property not found in
     71: } & TVViewProps;
             ^^^^^^^^^^^ object type. See: node_modules/react-native/Libraries/Components/View/ViewPropTypes.js:71
  Member 2:
   22: type Props = ViewProps & {
                                ^ object type
  Error:
   70:   static propTypes = {
                            ^ property `onLayout`. Property not found in
   22: type Props = ViewProps & {
                                ^ object type

node_modules/react-native/RNTester/js/MaskedViewExample.js:73
 73:             <MaskedViewIOS
                 ^ React element `MaskedViewIOS`
 22: type Props = ViewProps & {
                              ^ property `children`. Property not found in. See: node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js:22
 73:             <MaskedViewIOS
                 ^ props of React element `MaskedViewIOS`

node_modules/react-native/RNTester/js/MaskedViewExample.js:95
 95:             <MaskedViewIOS
                 ^ React element `MaskedViewIOS`
 22: type Props = ViewProps & {
                              ^ property `children`. Property not found in. See: node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js:22
 95:             <MaskedViewIOS
                 ^ props of React element `MaskedViewIOS`

node_modules/react-native/RNTester/js/MaskedViewExample.js:120
120:             <MaskedViewIOS
                 ^ React element `MaskedViewIOS`
 22: type Props = ViewProps & {
                              ^ property `children`. Property not found in. See: node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js:22
120:             <MaskedViewIOS
                 ^ props of React element `MaskedViewIOS`

node_modules/react-native/RNTester/js/MaskedViewExample.js:153
153:             <MaskedViewIOS
                 ^ React element `MaskedViewIOS`
 22: type Props = ViewProps & {
                              ^ property `children`. Property not found in. See: node_modules/react-native/Libraries/Components/MaskedView/MaskedViewIOS.ios.js:22
153:             <MaskedViewIOS
                 ^ props of React element `MaskedViewIOS`

(I am not using MaskedView)

Updating to a newer version of RN never fails to bring a slew of flow issues... why, why must it be so?

@Palisand
Copy link
Author

This is pretty out of date and is just taking up space in Issues:Open

@facebook facebook locked as resolved and limited conversation to collaborators Sep 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

2 participants