Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/util/propTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -1044,8 +1044,10 @@
if (
node.parent
&& node.parent.callee
&& node.parent.typeParameters
&& node.parent.typeParameters.params
&& (
(node.parent.typeParameters && node.parent.typeParameters.params)
|| (node.parent.typeArguments && node.parent.typeArguments.params)
)
&& (
node.parent.callee.name === 'forwardRef' || (
node.parent.callee.object
Expand All @@ -1055,7 +1057,7 @@
)
)
) {
const propTypesParams = node.parent.typeParameters;
const propTypesParams = node.parent.typeParameters || node.parent.typeArguments;

Check warning on line 1060 in lib/util/propTypes.js

View check run for this annotation

Codecov / codecov/patch

lib/util/propTypes.js#L1060

Added line #L1060 was not covered by tests
const declaredPropTypes = {};
const obj = new DeclarePropTypesForTSTypeAnnotation(propTypesParams.params[1], declaredPropTypes, rootNode);
components.set(node, {
Expand Down