Closed
Description
Assume I have a propTypes as follows:
propTypes: {
foo: PropTypes.number,
bar: PropTypes.shape({
faz: PropTypes.number,
qaz: PropTypes.object,
}),
};
I would want accessing this.props.bar.faz
to not generate an error, while this.props.bar.nope
to generate an error.
This may be tricky because PropTypes.shape
is technically a black box, but when used with something like recursive
from https://github.com/kolodny/zan it would make sense