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

This commit is contained in:
Max Schmitt 2024-02-27 16:21:35 +01:00 committed by GitHub
parent 1c8e8bea7e
commit 03902d8e85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -737,7 +737,8 @@ function parseTypeExpression(type) {
if (type[i] === '(') {
name = type.substring(0, 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;
if (type[i] === ':') {
retType = parseTypeExpression(type.substring(i + 1));