Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
if (type) {
propDescriptor.type = type
propDescriptor.required =
type.name !== 'custom' && isRequiredPropType(valuePath)
}
} else if (nodeType === types.SpreadProperty.name) {
resolvedValuePath = utils.resolveToValue(propertyPath.get('argument'))
// normal object literal
if (resolvedValuePath.node.type === types.ObjectExpression.name) {
amendPropTypes(documentation, resolvedValuePath)
}
}
if (types.Property.check(propertyPath.node)) {
setPropDescription(documentation, propertyPath)
}
})
}
};
if (type) {
propDescriptor.type = type;
propDescriptor.required =
type.name !== "custom" && isRequiredPropType(valuePath);
}
} else if (nodeType === types.SpreadProperty.name) {
resolvedValuePath = utils.resolveToValue(propertyPath.get("argument"));
// normal object literal
if (resolvedValuePath.node.type === types.ObjectExpression.name) {
amendPropTypes(documentation, resolvedValuePath);
}
}
if (types.Property.check(propertyPath.node)) {
setPropDescription(documentation, propertyPath);
}
});
}