cherry-pick(#29684): chore: fix docs roll for functions without args

This commit is contained in:
github-actions 2024-02-27 15:51:44 +00:00
parent aa9f6fb718
commit e552d302ac

View file

@ -737,7 +737,8 @@ function parseTypeExpression(type) {
if (type[i] === '(') { if (type[i] === '(') {
name = type.substring(0, i); name = type.substring(0, i);
const matching = matchingBracket(type.substring(i), '(', ')'); const matching = matchingBracket(type.substring(i), '(', ')');
args = parseTypeExpression(type.substring(i + 1, i + matching - 1)); const argsString = type.substring(i + 1, i + matching - 1);
args = argsString ? parseTypeExpression(argsString) : null;
i = i + matching; i = i + matching;
if (type[i] === ':') { if (type[i] === ':') {
retType = parseTypeExpression(type.substring(i + 1)); retType = parseTypeExpression(type.substring(i + 1));