Skip to content

Intersection Flow Type error #1468

Closed
Closed
@dawidvdh

Description

Receiving the following error:

Cannot read property 'properties' of undefined
TypeError: Cannot read property 'properties' of undefined
    at annotation.types.reduce (/Users/proj/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:180:44)
    at Array.reduce (<anonymous>)
    at getPropertiesFromIntersectionTypeAnnotationNode (/Users/proj/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:173:31)
    at getPropTypesFromTypeAnnotation (/Users/proj/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:197:26)
    at Object.handleStatelessComponent (/Users/proj/node_modules/eslint-plugin-react/lib/rules/default-props-match-prop-types.js:331:42)
    at updatedRuleInstructions.(anonymous function) (/Users/proj/node_modules/eslint-plugin-react/lib/util/Components.js:666:75)
    at listeners.(anonymous function).forEach.listener (/Users/proj/node_modules/eslint/lib/util/safe-emitter.js:47:58)
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/proj/node_modules/eslint/lib/util/safe-emitter.js:47:38)
    at NodeEventGenerator.applySelector (/Users/proj/node_modules/eslint/lib/util/node-event-generator.js:251:26)

When attempting to use intersection flow type like so:

import type { FieldProps } from "redux-form"

type Props = {
  label: string,
  type: string,
  options: Array<SelectOption>
} & FieldProps

I looked through previous issues and PR's and noticed similar issues however I am not sure if this has been resolved or not or if I am not doing this correctly.

Also I am using version 7.4.0 of this plugin.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions