Skip to content

no-unused-prop-types does not process intersection flow types #1323

Closed
@willmruzek

Description

no-unused-prop-types does not currently flag unused PropTypes in flow intersection types.

In this case, it should be flagging age.

type AProps = {
  name: string;
  age: number;
};

type BProps = {
  greeting: string;
};

type Props = AProps & BProps;

class Hello extends React.Component {
  props: Props;

  render () {
    return <div>{this.props.greeting}, {this.props.name}</div>;
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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