Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isPropTypesExpression(path) {
const moduleName = utils.resolveToModule(path);
if (moduleName) {
return (
utils.isReactModuleName(moduleName) || moduleName === "ReactPropTypes"
);
}
return false;
}
function isPropTypesExpression(path: string) {
const moduleName = utils.resolveToModule(path)
if (moduleName) {
return (
utils.isReactModuleName(moduleName) || moduleName === 'ReactPropTypes'
)
}
return false
}