-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
For all of the following examples, propTypes are incorrectly not removed:
import PropTypes from 'prop-types';
export default function Foo({ children }) {
return children();
}
Foo.propTypes = {
children: PropTypes.func.isRequired,
};import PropTypes from 'prop-types';
export default function Foo({ children }) {
return children;
}
Foo.propTypes = {
children: PropTypes.node,
};import PropTypes from 'prop-types';
export default function Foo({ children }) {
return <>{children}</>;
}
Foo.propTypes = {
children: PropTypes.node,
};While this works:
import PropTypes from 'prop-types';
export default function Foo({ children }) {
return <div>{children}</div>;
}
Foo.propTypes = {
children: PropTypes.node,
};aliebuck, MoltenCoffee and jsmecham
Metadata
Metadata
Assignees
Labels
No labels