function buildReactDeclarationTypes(value,parentName){if(value&&value.callee&&value.callee.object&&hasCustomValidator(value.callee.object.name)){return true;}if(value&&value.type==='MemberExpression'&&value.property&&value.property.name&&value.property.name==='isRequired'){value=value.object;}// Verify React.PropTypes that are functions
if(value&&value.type==='CallExpression'&&value.callee&&value.callee.property&&value.callee.property.name&&value.arguments&&value.arguments.length>0){var callName=value.callee.property.name;var argument=value.arguments[0];switch(callName){case'shape':if(skipShapeProps){return true;}if(argument.type!=='ObjectExpression'){// Invalid proptype or cannot analyse statically
return true;}var shapeTypeDefinition={type:'shape',children:[]};iterateProperties(argument.properties,function(childKey,childValue){var fullName=[parentName,childKey].join('.');var types=buildReactDeclarationTypes(childValue,fullName);if(types===true){types={};}types.fullName=fullName;types.name=childKey;types.node=childValue;shapeTypeDefinition.children.push(types);});return shapeTypeDefinition;case'arrayOf':case'objectOf':var fullName=[parentName,'*'].join('.');var child=buildReactDeclarationTypes(argument,fullName);if(child===true){child={};}child.fullName=fullName;child.name='__ANY_KEY__';child.node=argument;return{type:'object',children:[child]};case'oneOfType':if(!argument.elements||!argument.elements.length){// Invalid proptype or cannot analyse statically
return true;}var unionTypeDefinition={type:'union',children:[]};for(var i=0,j=argument.elements.length;i<j;i++){var type=buildReactDeclarationTypes(argument.elements[i],parentName);// keep only complex type
if(type!==true){if(type.children===true){// every child is accepted for one type, abort type analysis
unionTypeDefinition.children=true;return unionTypeDefinition;}}unionTypeDefinition.children.push(type);}if(unionTypeDefinition.length===0){// no complex type found, simply accept everything
return true;}return unionTypeDefinition;case'instanceOf':return{type:'instance',// Accept all children because we can't know what type they are
children:true};case'oneOf':default:return true;}}// Unknown property or accepts everything (any, object, ...)
return true;}
Creates the representation of the React propTypes for the component.
The representation is used to verify nested used properties.
@param {ASTNode} value Node of the React.PropTypes for the desired property
@param {String} parentName Name of the parent prop node.
@return {Object|Boolean} The representation of the declaration, true means
   the property is declared without the need for further analysis.