function buildTypeAnnotationDeclarationTypes(annotation,parentName){switch(annotation.type){case'GenericTypeAnnotation':if(typeScope(annotation.id.name)){return buildTypeAnnotationDeclarationTypes(typeScope(annotation.id.name),parentName);}return true;case'ObjectTypeAnnotation':var shapeTypeDefinition={type:'shape',children:[]};iterateProperties(annotation.properties,function(childKey,childValue){var fullName=[parentName,childKey].join('.');var types=buildTypeAnnotationDeclarationTypes(childValue,fullName);if(types===true){types={};}types.fullName=fullName;types.name=childKey;types.node=childValue;shapeTypeDefinition.children.push(types);});return shapeTypeDefinition;case'UnionTypeAnnotation':var unionTypeDefinition={type:'union',children:[]};for(var i=0,j=annotation.types.length;i<j;i++){var type=buildTypeAnnotationDeclarationTypes(annotation.types[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.children.length===0){// no complex type found, simply accept everything
return true;}return unionTypeDefinition;case'ArrayTypeAnnotation':var fullName=[parentName,'*'].join('.');var child=buildTypeAnnotationDeclarationTypes(annotation.elementType,fullName);if(child===true){child={};}child.fullName=fullName;child.name='__ANY_KEY__';child.node=annotation;return{type:'object',children:[child]};default:// Unknown or accepts everything.
return true;}}
Creates the representation of the React props type annotation for the component.
The representation is used to verify nested used properties.
@param {ASTNode} annotation Type annotation for the props class 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.