Skip to content

Commit 4b72131

Browse files
committed
update path check method
1 parent b22fb2a commit 4b72131

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ function checkForProptypes(path, paramTypeName) {
4747
}
4848

4949
function setParamsTypeDefinitionFromFunctionType(documentation, path) {
50+
if (
51+
path.parentPath.node.init &&
52+
Array.isArray(path.parentPath.node.init.params) &&
53+
path.parentPath.node.init.params.length === 0
54+
)
55+
{
56+
return;
57+
}
58+
5059
if (
5160
path.node.type === 'ArrowFunctionExpression' &&
5261
(

0 commit comments

Comments
 (0)