diff --git a/lib/util/propTypes.js b/lib/util/propTypes.js index 6ff6c3dcc5..15c7b44fec 100644 --- a/lib/util/propTypes.js +++ b/lib/util/propTypes.js @@ -1017,9 +1017,9 @@ module.exports = function propTypesInstructions(context, components, utils) { ) ) ) { - const propTypes = node.parent.typeArguments || node.parent.typeParameters; + const typeParams = node.parent.typeArguments || node.parent.typeParameters; const declaredPropTypes = {}; - const obj = new DeclarePropTypesForTSTypeAnnotation(propTypes.params[1], declaredPropTypes); + const obj = new DeclarePropTypesForTSTypeAnnotation(typeParams.params[1], declaredPropTypes); components.set(node, { declaredPropTypes: obj.declaredPropTypes, ignorePropsValidation: obj.shouldIgnorePropTypes,