Skip to content

Commit e552d30

Browse files
cherry-pick(#29684): chore: fix docs roll for functions without args
1 parent aa9f6fb commit e552d30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/doclint/documentation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,8 @@ function parseTypeExpression(type) {
737737
if (type[i] === '(') {
738738
name = type.substring(0, i);
739739
const matching = matchingBracket(type.substring(i), '(', ')');
740-
args = parseTypeExpression(type.substring(i + 1, i + matching - 1));
740+
const argsString = type.substring(i + 1, i + matching - 1);
741+
args = argsString ? parseTypeExpression(argsString) : null;
741742
i = i + matching;
742743
if (type[i] === ':') {
743744
retType = parseTypeExpression(type.substring(i + 1));

0 commit comments

Comments
 (0)