-
-
Notifications
You must be signed in to change notification settings - Fork 302
Closed
Description
Hello,
Props with a prop type of objectOf
get parsed as a custom
prop type rather than an objectOf
prop type with a value
property defining what the values of the object should be (like how arrayOf
is handled).
Input:
Component.propTypes = {
optionalArrayOf: React.PropTypes.arrayOf(React.PropTypes.number),
optionalObjectOf: React.PropTypes.objectOf(React.PropTypes.number),
};
Output:
{
"optionalArrayOf": {
"type": {
"name": "arrayOf",
"value": {
"name": "number"
}
},
"required": false,
"description": ""
},
"optionalObjectOf": {
"type": {
"name": "custom",
"raw": "React.PropTypes.objectOf(React.PropTypes.number)"
},
"required": false,
"description": ""
}
}